diff --git a/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql b/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql new file mode 100644 index 0000000..d982e7c --- /dev/null +++ b/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql @@ -0,0 +1,38 @@ +DELETE { + GRAPH ?g { + ?representatieveOrgaan ?bestuur . + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?representatieveOrgaan ?bestuur . + + ?bestuur ?primarySite ; + ?identifier ; + ?pbestuur ?obestuur . + + ?primarySite ?address ; + ?contactPoint ; + ?pprimarySite ?oprimarySite . + + ?address ?paddress ?oaddress . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + ?identifier ?structuredIdentifier ; + ?pidentifier ?oidentifier . + + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} + diff --git a/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql b/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql new file mode 100644 index 0000000..ced71d1 --- /dev/null +++ b/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql @@ -0,0 +1,15 @@ +PREFIX dct: + +DELETE { + GRAPH ?g { + dct:date "2021-11-28"^^xsd:date . + } +} INSERT { + GRAPH ?g { + dct:date "2021-12-20"^^xsd:date . + } +} WHERE { + GRAPH ?g { + dct:date "2021-11-28"^^xsd:date . + } +} diff --git a/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql b/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql new file mode 100644 index 0000000..eb9d235 --- /dev/null +++ b/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql @@ -0,0 +1,26 @@ +PREFIX dct: +PREFIX regorg: + +DELETE { + GRAPH ?g { + + dct:date "2021-02-04"^^xsd:date . + + regorg:orgStatus . # Actief + } +} INSERT { + GRAPH ?g { + + dct:date "2022-02-04"^^xsd:date . + + regorg:orgStatus . # Niet Actief + + } +} WHERE { + GRAPH ?g { + + dct:date "2021-02-04"^^xsd:date . + + regorg:orgStatus . + } +} diff --git a/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql b/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql new file mode 100644 index 0000000..ce65032 --- /dev/null +++ b/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql @@ -0,0 +1,77 @@ +# Splitting the query in two because of execution time + +## Links to the bestuur + + + +DELETE { + GRAPH ?g { + ?representatieveOrgaan ?bestuur . + ?orgaanInTijd ?porgaanInTijd ?oorgaanInTijd . + ?orgaan ?porgaan ?oorgaan . + ?betrokken ?pbetrokken ?obetrokken . + ?eenheid ?betrokken . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?representatieveOrgaan ?bestuur . + + OPTIONAL { + ?orgaanInTijd ?bestuur ; + ?porgaanInTijd ?oorgaanInTijd . + + ?orgaan ?orgaanInTijd ; + ?porgaan ?oorgaan . + } + + OPTIONAL { + ?betrokken ?bestuur ; + ?pbetrokken ?obetrokken . + ?eenheid ?betrokken . + } + } +} + +; + +## Links from the bestuur + +DELETE { + GRAPH ?g { + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?bestuur ?primarySite ; + ?identifier ; + ?pbestuur ?obestuur . + + ?primarySite ?address ; + ?contactPoint ; + ?pprimarySite ?oprimarySite . + + ?address ?paddress ?oaddress . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + ?identifier ?structuredIdentifier ; + ?pidentifier ?oidentifier . + + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} \ No newline at end of file