diff --git a/config/migrations/2022/20220414132656-fix-wrong-resulting-org-after-merge.sparql b/config/migrations/2022/20220414132656-fix-wrong-resulting-org-after-merge.sparql new file mode 100644 index 0000000..86dd408 --- /dev/null +++ b/config/migrations/2022/20220414132656-fix-wrong-resulting-org-after-merge.sparql @@ -0,0 +1,42 @@ +# Update status of the bestuurseenheden as well as the resulting status of the change event + +PREFIX regorg: +PREFIX lblodOrg: + +DELETE { + GRAPH ?g { + + regorg:orgStatus . # Actief + + lblodOrg:resulterendeStatus . # Actief + + + regorg:orgStatus . # Niet Actief + + lblodOrg:resulterendeStatus . # Niet Actief + } +} INSERT { + GRAPH ?g { + + regorg:orgStatus . # Niet Actief + + lblodOrg:resulterendeStatus . # Niet Actief + + + regorg:orgStatus . # Actief + + lblodOrg:resulterendeStatus . # Actief + } +} WHERE { + GRAPH ?g { + + regorg:orgStatus . # Actief + + lblodOrg:resulterendeStatus . # Actief + + + regorg:orgStatus . # Niet Actief + + lblodOrg:resulterendeStatus . # Niet Actief + } +}