diff --git a/config/migrations/2022/20221227100001-modify-date-of-change-event-OP-1981.sparql b/config/migrations/2022/20221227100001-modify-date-of-change-event-OP-1981.sparql new file mode 100644 index 0000000..6e75cf9 --- /dev/null +++ b/config/migrations/2022/20221227100001-modify-date-of-change-event-OP-1981.sparql @@ -0,0 +1,17 @@ +PREFIX dct: + +DELETE { + GRAPH ?g { + dct:date "2022-12-21"^^xsd:date . + } +} INSERT { + GRAPH ?g { + dct:date "2022-12-20"^^xsd:date . + } +} WHERE { + GRAPH ?g { + dct:date "2022-12-21"^^xsd:date . + } +} + +# OP-1981 \ No newline at end of file diff --git a/config/migrations/2023/20230106110000-delete-duplicate-worship-services.sparql b/config/migrations/2023/20230106110000-delete-duplicate-worship-services.sparql new file mode 100644 index 0000000..e4d3e47 --- /dev/null +++ b/config/migrations/2023/20230106110000-delete-duplicate-worship-services.sparql @@ -0,0 +1,148 @@ +PREFIX owl: +PREFIX rdfs: +PREFIX skos: +PREFIX org: +PREFIX regorg: +PREFIX person: +PREFIX besluit: +PREFIX mandaat: +PREFIX organisatie: +PREFIX mu: +PREFIX ext: +PREFIX ere: + +DELETE { + GRAPH { + ?representatieveOrgaan ?bestuur . + ?bestuur ?pbestuur ?obestuur . + } +} WHERE { + GRAPH { + VALUES ?bestuur { + # OP-1980 + # OP-1978 + # OP-1979 + # OP-1977 + } + + OPTIONAL { ?representatieveOrgaan ?bestuur } + + ?bestuur ?pbestuur ?obestuur . + + } +} + +; + +DELETE { + GRAPH { + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + } +} WHERE { + GRAPH { + VALUES ?bestuur { + # OP-1980 + # OP-1978 + # OP-1979 + # OP-1977 + } + + OPTIONAL { + ?bestuur ?primarySite. + ?primarySite ?pprimarySite ?oprimarySite . + } + + OPTIONAL { + ?primarySite ?address. + ?address ?paddress ?oaddress . + } + + OPTIONAL { + ?primarySite ?contactPoint . + ?contactPoint ?pcontactPoint ?ocontactPoint . + } + } +} + +; + +DELETE { + GRAPH { + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH { + VALUES ?bestuur { + # OP-1980 + # OP-1978 + # OP-1979 + # OP-1977 + } + + OPTIONAL { + ?bestuur ?identifier . + ?identifier ?pidentifier ?oidentifier . + } + + OPTIONAL { + ?identifier ?structuredIdentifier. + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } + } +} + +; + +# Clean reminiscences + +DELETE { + GRAPH { + ?s ?p ?o . + } +} WHERE { + GRAPH { + VALUES ?o { + # OP-1980 + # OP-1978 + # OP-1979 + # OP-1977 + } + + OPTIONAL{ ?s ?p ?o } + } +} + +# The associated call to trigger a reindex is : + +# curl --location --request POST '172.20.0.15/update' \ +# --header 'Content-Type: application/vnd.api+json' \ +# --data-raw ' [ +# { +# "deletes": [ +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/999b011fe6b90b3b546612c25db4b607" }, +# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" }, +# "object": { "type": "string", "value": "999b011fe6b90b3b546612c25db4b607" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/da2184c3dca9eb7c4828a50c0e9f5af4" }, +# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" }, +# "object": { "type": "string", "value": "da2184c3dca9eb7c4828a50c0e9f5af4" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/a6b5c5db3a261ca024a42fe9489496a9" }, +# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" }, +# "object": { "type": "string", "value": "a6b5c5db3a261ca024a42fe9489496a9" } +# }, +# { +# "subject": { "type": "uri", "value": "http://data.lblod.info/id/besturenVanDeEredienst/260312c07d8e00358064a362dee3506f" }, +# "predicate": { "type": "uri", "value": "http://mu.semte.ch/vocabularies/core/uuid" }, +# "object": { "type": "string", "value": "260312c07d8e00358064a362dee3506f" } +# } +# ], +# "inserts": [] +# } +# ]' \ No newline at end of file