diff --git a/config/migrations/2023/20230306142222-move-orgaan-to-worship.sparql b/config/migrations/2023/20230306142222-move-orgaan-to-worship.sparql new file mode 100644 index 0000000..7bef175 --- /dev/null +++ b/config/migrations/2023/20230306142222-move-orgaan-to-worship.sparql @@ -0,0 +1,107 @@ +PREFIX xsd: +PREFIX mu: +PREFIX persoon: +PREFIX ext: +PREFIX person: +PREFIX session: +PREFIX foaf: +PREFIX besluit: +PREFIX ere: +PREFIX mandaat: +PREFIX org: +PREFIX generiek: + +DELETE { + GRAPH { + ?s ?p ?o. + } +} +INSERT { + GRAPH { + ?s ?p ?o. + } +} + +WHERE { + GRAPH { + ?s a ; + ?classification; + ?p ?o. + +filter exists { + graph { + ?classification ?appliesWithin. + ?appliesWithin mu:uuid ?classificationUuid. + + filter(?classificationUuid in ("66ec74fd-8cfc-4e16-99c6-350b35012e86","f9cac08a-13c1-49da-9bcb-f650b0604054")) + } +} + + + + +} + +} +; + +DELETE { + GRAPH { + ?specialization ?specializationP ?specializationO. + } +} +INSERT { + GRAPH { + ?specialization ?specializationP ?specializationO. + } +} + +WHERE { + GRAPH { + ?specialization a ; generiek:isTijdspecialisatieVan ?specialization2; ?specializationP ?specializationO. + +filter exists{ + +graph { + + + ?specialization2 a . +} +} +} + + +} +; + + + + +; + + + +DELETE { + GRAPH { + ?mandaat ?p ?o. + } +} +INSERT { + GRAPH { + ?mandaat ?p ?o. + } +} + +WHERE { + GRAPH { + ?mandaat ?p ?o. + filter exists { + GRAPH { + ?orgaan ?mandaat. + + } + } +} + + +}