From 148a3f3ca7bc78a20a0d8f173916cfd08a446c14 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Thu, 14 Apr 2022 13:41:33 +0200 Subject: [PATCH] Fix change event resulting org and statuses --- ...fix-wrong-resulting-org-after-merge.sparql | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 config/migrations/2022/20220414132656-fix-wrong-resulting-org-after-merge.sparql 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 + } +}