From a1655337c27e0ea67bb61e08c8357831a259136c Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Tue, 29 Mar 2022 15:55:43 +0200 Subject: [PATCH] Adds migrations to fix wrong data --- ...1923-update-date-change-event-Eeklo.sparql | 15 ++++++++ ...3-update-date-change-event-Glabbeek.sparql | 15 ++++++++ ...-de-Anglicaanse-Eredienst-in-Belgie.sparql | 19 ++++++++++ ...ions-Protestantse-Kerk-van-Kortrijk.sparql | 38 +++++++++++++++++++ ...9154322-delete-positions-ckb-staden.sparql | 38 +++++++++++++++++++ 5 files changed, 125 insertions(+) create mode 100644 config/migrations/2022/20220328171923-update-date-change-event-Eeklo.sparql create mode 100644 config/migrations/2022/20220328172743-update-date-change-event-Glabbeek.sparql create mode 100644 config/migrations/2022/20220329114750-remove-kbo-of-Centraal-Comite-van-de-Anglicaanse-Eredienst-in-Belgie.sparql create mode 100644 config/migrations/2022/20220329150729-delete-positions-Protestantse-Kerk-van-Kortrijk.sparql create mode 100644 config/migrations/2022/20220329154322-delete-positions-ckb-staden.sparql diff --git a/config/migrations/2022/20220328171923-update-date-change-event-Eeklo.sparql b/config/migrations/2022/20220328171923-update-date-change-event-Eeklo.sparql new file mode 100644 index 0000000..9739adf --- /dev/null +++ b/config/migrations/2022/20220328171923-update-date-change-event-Eeklo.sparql @@ -0,0 +1,15 @@ +PREFIX dct: + +DELETE { + GRAPH ?g { + dct:date "2018-06-09"^^xsd:date . + } +} INSERT { + GRAPH ?g { + dct:date "2018-06-15"^^xsd:date . + } +} WHERE { + GRAPH ?g { + dct:date "2018-06-09"^^xsd:date . + } +} diff --git a/config/migrations/2022/20220328172743-update-date-change-event-Glabbeek.sparql b/config/migrations/2022/20220328172743-update-date-change-event-Glabbeek.sparql new file mode 100644 index 0000000..314a72c --- /dev/null +++ b/config/migrations/2022/20220328172743-update-date-change-event-Glabbeek.sparql @@ -0,0 +1,15 @@ +PREFIX dct: + +DELETE { + GRAPH ?g { + dct:date "2021-02-04"^^xsd:date . + } +} INSERT { + GRAPH ?g { + dct:date "2022-02-04"^^xsd:date . + } +} WHERE { + GRAPH ?g { + dct:date "2021-02-04"^^xsd:date . + } +} diff --git a/config/migrations/2022/20220329114750-remove-kbo-of-Centraal-Comite-van-de-Anglicaanse-Eredienst-in-Belgie.sparql b/config/migrations/2022/20220329114750-remove-kbo-of-Centraal-Comite-van-de-Anglicaanse-Eredienst-in-Belgie.sparql new file mode 100644 index 0000000..a888347 --- /dev/null +++ b/config/migrations/2022/20220329114750-remove-kbo-of-Centraal-Comite-van-de-Anglicaanse-Eredienst-in-Belgie.sparql @@ -0,0 +1,19 @@ +DELETE { + GRAPH ?g { + + ?identifier . + ?identifier + ?structuredIdentifier ; + ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + + ?identifier . + ?identifier + ?structuredIdentifier ; + ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} diff --git a/config/migrations/2022/20220329150729-delete-positions-Protestantse-Kerk-van-Kortrijk.sparql b/config/migrations/2022/20220329150729-delete-positions-Protestantse-Kerk-van-Kortrijk.sparql new file mode 100644 index 0000000..3cd75ec --- /dev/null +++ b/config/migrations/2022/20220329150729-delete-positions-Protestantse-Kerk-van-Kortrijk.sparql @@ -0,0 +1,38 @@ +DELETE { + GRAPH ?g { + + ?post . + + ?post ?ppost ?opost . + + ?role ?post ; + ?contactPoint ; + ?prole ?orole . + + ?contactPoint ?address ; + ?pcontactPoint ?ocontactPoint . + + ?address ?paddress ?oaddress . + } +} WHERE { + GRAPH ?g { + + ?post . + + ?post ?ppost ?opost . + + ?role ?post ; + ?prole ?orole . + + OPTIONAL { + ?role ?contactPoint . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + OPTIONAL { + ?contactPoint ?address . + ?address ?paddress ?oaddress . + } + } + } +} diff --git a/config/migrations/2022/20220329154322-delete-positions-ckb-staden.sparql b/config/migrations/2022/20220329154322-delete-positions-ckb-staden.sparql new file mode 100644 index 0000000..32cb92e --- /dev/null +++ b/config/migrations/2022/20220329154322-delete-positions-ckb-staden.sparql @@ -0,0 +1,38 @@ +DELETE { + GRAPH ?g { + + ?post . + + ?post ?ppost ?opost . + + ?role ?post ; + ?contactPoint ; + ?prole ?orole . + + ?contactPoint ?address ; + ?pcontactPoint ?ocontactPoint . + + ?address ?paddress ?oaddress . + } +} WHERE { + GRAPH ?g { + + ?post . + + ?post ?ppost ?opost . + + ?role ?post ; + ?prole ?orole . + + OPTIONAL { + ?role ?contactPoint . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + OPTIONAL { + ?contactPoint ?address . + ?address ?paddress ?oaddress . + } + } + } +}