diff --git a/config/migrations/2023/20230919113001-boolean-datatype.sparql b/config/migrations/2023/20230919113001-boolean-datatype.sparql new file mode 100644 index 0000000..2f71ead --- /dev/null +++ b/config/migrations/2023/20230919113001-boolean-datatype.sparql @@ -0,0 +1,17 @@ +PREFIX xsd: + +DELETE { + GRAPH ?g { + ?s ?p ?o . + } +} INSERT { + GRAPH ?g { + ?s ?p ?newLiteral . + } +} WHERE { + GRAPH ?g { + ?s ?p ?o . + FILTER (datatype(?o) = ) + BIND (STRDT(STR(?o), xsd:boolean) AS ?newLiteral) + } +} \ No newline at end of file