From 80ad432a5cdf25e00d4202bf974545685c9d6326 Mon Sep 17 00:00:00 2001 From: mirdono Date: Wed, 8 Jan 2025 15:48:58 +0100 Subject: [PATCH] fix: relate merged municipalities and province in shared graph When new organisations were added for some merged municipalities (see PR #442) their `org:hasSubOrganization` link with the province was inserted in to the `` graph instead of the ``. Consequently, when logged in as a worship user and either of these municipalities were selected in a form, the corresponding province was not automatically filled in. This is due to the fact that worship users cannot read from the `administrative-unit` graph. This migration moves the appropriate `org:hasSubOrganization` triples to the correct graph such that the behaviour for worship and non-worship users is the same again. --- ...-hassuborganization-to-shared-graph.sparql | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 config/migrations/2025/20250108143939-fix-municipality-mergers--move-province-hassuborganization-to-shared-graph.sparql diff --git a/config/migrations/2025/20250108143939-fix-municipality-mergers--move-province-hassuborganization-to-shared-graph.sparql b/config/migrations/2025/20250108143939-fix-municipality-mergers--move-province-hassuborganization-to-shared-graph.sparql new file mode 100644 index 0000000..6c48bc9 --- /dev/null +++ b/config/migrations/2025/20250108143939-fix-municipality-mergers--move-province-hassuborganization-to-shared-graph.sparql @@ -0,0 +1,23 @@ +PREFIX org: + +DELETE { + GRAPH { + ?province org:hasSubOrganization ?municipality. + } +} +INSERT { + GRAPH { + ?province org:hasSubOrganization ?municipality. + } +} +WHERE { + GRAPH { + ?province org:hasSubOrganization ?municipality. + } + VALUES ?municipality { + # Beveren-Kruibeke-Zwijndrecht + # Nazareth-De Pinte + # Pajottegem + # Merelbeke-Melle + } +}