From 3b6a5f8c4451d2e51b0db630102d039baf77193b Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Fri, 4 Mar 2022 15:51:09 +0100 Subject: [PATCH 1/4] Add migration to delete CKB Wachtebeke --- ...ete-centraal-kerkbestuur-wachtebeke.sparql | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql 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 . + } +} + From 09fbb2d06a52a20d398bfc13f6a163170020ac36 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 10:32:00 +0100 Subject: [PATCH 2/4] Add migration to fix change event date --- ...92611-update-date-change-event-Zonhoven.sparql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql 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 . + } +} From d0473d35a2efc19f9eb53ace2fc180cb736e0365 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 13:54:21 +0100 Subject: [PATCH 3/4] Add migration to update change event and status --- ...104523-update-change-event-glabbeek.sparql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql 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 . + } +} From ab12f4e15bca4866fd38a45797d445df04e5393b Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 15:20:10 +0100 Subject: [PATCH 4/4] Add migration to remove duplicated organizations --- ...-remove-duplicated-bestuurseenheden.sparql | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql 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