diff --git a/config/migrations/2024/20241028125621-remove-functionarissen-newly-created-organen.sparql b/config/migrations/2024/20241028125621-remove-functionarissen-newly-created-organen.sparql new file mode 100644 index 0000000..257b4eb --- /dev/null +++ b/config/migrations/2024/20241028125621-remove-functionarissen-newly-created-organen.sparql @@ -0,0 +1,37 @@ +PREFIX skos: + +DELETE { + GRAPH ?g { + ?orgIntijdNew ?orgIntijdNewP ?orgIntijdNewO. + ?bestuursfunctie ?bestuursfunctieP ?bestuursfunctieO. + } +} + +WHERE { + VALUES ?class { + # "Adjunct-algemeen directeur" + # "Algemeen directeur" + # "Leidend Ambtenaar" + # "Financieel directeu" + # "Adjunct-financieel directeur" + # "Financieel beheerder" + # Griffier + } + + ?s a ; + ?class. + + ?orgIntijdOld ?s; + ?old. + + ?orgIntijdNew ?s; + ?new. + + FILTER(?new > ?old) + + GRAPH ?g { + ?orgIntijdNew ?orgIntijdNewP ?orgIntijdNewO. + ?orgIntijdNew ?bestuursfunctie. + ?bestuursfunctie ?bestuursfunctieP ?bestuursfunctieO. + } +} \ No newline at end of file