From f85124e66850eeb8ce53457586d22da651a97cfd Mon Sep 17 00:00:00 2001 From: Nordine Bittich <3816305+nbittich@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:20:07 +0100 Subject: [PATCH] fix missing resulting org & betrokke (#369) --- ...15141651-fix-missing-resulting-orgs.sparql | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 config/migrations/2024/20240115141651-fix-missing-resulting-orgs.sparql diff --git a/config/migrations/2024/20240115141651-fix-missing-resulting-orgs.sparql b/config/migrations/2024/20240115141651-fix-missing-resulting-orgs.sparql new file mode 100644 index 00000000..cad97298 --- /dev/null +++ b/config/migrations/2024/20240115141651-fix-missing-resulting-orgs.sparql @@ -0,0 +1,24 @@ +PREFIX rdf: +PREFIX org: +PREFIX mu: +PREFIX ext: +PREFIX ch: +PREFIX code: + + + +INSERT { + graph ?g { + ?ce org:resultingOrganization ?extResultingOrg. + ?ce org:originalOrganization ?extResultingOrg + } +} +WHERE { + graph ?g { + ?ce rdf:type org:ChangeEvent ; + code:veranderingsgebeurtenisResultaat ?resultaat. + ?resultaat . + ?resultaat ext:resultingOrganization ?extResultingOrg. + filter not exists {?ce org:resultingOrganization ?result } + } +}