From 61b5efc0dff1a62c94a19ad2f88c0cc340028eb7 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Wed, 18 May 2022 13:22:26 +0200 Subject: [PATCH] Add migration to delete some positions (#152) --- ...s-Kerkfabriek-H-Maria-van-Boutersem.sparql | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 config/migrations/2022/20220518120232-delete-some-positions-Kerkfabriek-H-Maria-van-Boutersem.sparql diff --git a/config/migrations/2022/20220518120232-delete-some-positions-Kerkfabriek-H-Maria-van-Boutersem.sparql b/config/migrations/2022/20220518120232-delete-some-positions-Kerkfabriek-H-Maria-van-Boutersem.sparql new file mode 100644 index 0000000..ed2fd75 --- /dev/null +++ b/config/migrations/2022/20220518120232-delete-some-positions-Kerkfabriek-H-Maria-van-Boutersem.sparql @@ -0,0 +1,51 @@ +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 . + } + } + + FILTER( + ?role NOT IN ( + , + , + , + , + , + , + , + + ) + ) + } +}