From d687463c0dba2ed2cee0b56fe99ea7191b531799 Mon Sep 17 00:00:00 2001 From: mirdono Date: Wed, 16 Oct 2024 12:51:08 +0200 Subject: [PATCH] feat: import modified CLB data These migrations add the contact data from CLB production that was modified in that app during the time it was available. These migrations perform the following actions, in the specified order: 1. Delete all contact data for the 8 modified sites 2. Import the data extracted from CLB production for the relevant organisations Done in separate migrations for worship and non-worship organisations. 3. Correct a phone number literal that contained spaces for some reason --- ...delete-contact-data-modified-in-clb.sparql | 62 ++++++ ...rod-contactdata-administrative-units.graph | 1 + ...-prod-contactdata-administrative-units.ttl | 185 ++++++++++++++++++ ...9161900-clb-prod-contactdata-worship.graph | 1 + ...009161900-clb-prod-contactdata-worship.ttl | 59 ++++++ ...-fix--remove-spaces-in-phone-number.sparql | 9 + 6 files changed, 317 insertions(+) create mode 100644 config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009143404-delete-contact-data-modified-in-clb.sparql create mode 100644 config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.graph create mode 100644 config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.ttl create mode 100644 config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.graph create mode 100644 config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.ttl create mode 100644 config/migrations/2024/20241009143404-update-contact-data-from-clb/20241011132019-fix--remove-spaces-in-phone-number.sparql diff --git a/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009143404-delete-contact-data-modified-in-clb.sparql b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009143404-delete-contact-data-modified-in-clb.sparql new file mode 100644 index 0000000..6e84082 --- /dev/null +++ b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009143404-delete-contact-data-modified-in-clb.sparql @@ -0,0 +1,62 @@ +PREFIX org: +PREFIX organisatie: +PREFIX locn: +PREFIX besluit: + +DELETE { + GRAPH ?g { + ?site ?pSite ?oSite . + ?contact ?pContact ?oContact . + ?address ?pAddress ?oAddress . + ?addressContact ?pAddressContact ?oAddressContact . + } +} WHERE { + VALUES ?hasSite { + + + } + + FILTER (?site IN + ( + , + , + , + , + , + , + , + + )) + + GRAPH ?organisationGraph { + ?organisation ?hasSite ?site . + } + + VALUES ?organisationGraph { + + + + } + + GRAPH ?g { + ?site ?pSite ?oSite . + { + ?site org:siteAddress ?contact . + ?contact ?pContact ?oContact . + ?contact locn:address ?addressContact . + ?addressContact ?pAddressContact ?oAddressContact . + } UNION { + ?site org:siteAddress ?contact . + ?contact ?pContact ?oContact . + } UNION { + ?site organisatie:bestaatUit ?address . + ?address ?pAddress ?oAddress . + } + } + + VALUES ?g { + + + + } +} diff --git a/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.graph b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.graph new file mode 100644 index 0000000..89df8c6 --- /dev/null +++ b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.graph @@ -0,0 +1 @@ +http://mu.semte.ch/graphs/administrative-unit diff --git a/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.ttl b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.ttl new file mode 100644 index 0000000..79a9c8c --- /dev/null +++ b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161800-clb-prod-contactdata-administrative-units.ttl @@ -0,0 +1,185 @@ +@prefix rdf: . +@prefix ns1: . +@prefix ns2: . +@prefix ns3: . +@prefix ns4: . +@prefix ns5: . +@prefix ns6: . +@prefix ns7: . +@prefix ns8: . +@prefix ns9: . +@prefix ns10: . +@prefix ns11: . +@prefix ns12: . +@prefix foaf: . + + + rdf:type ns1:ContactPoint ; + ns2:uuid "66914D256ABB62E36F847154" ; + ns1:contactType "Secondary" . + + rdf:type ns3:Address ; + ns2:uuid "5352f18dfed80644af9e3c98745bab32" ; + "5" ; + ns3:thoroughfare "Kerkstraat" ; + ns3:postCode "2560" ; + ns4:gemeentenaam "Nijlen" ; + ns3:fullAddress "Kerkstraat 5, 2560 Nijlen, Belgi\u00EB" ; + ns3:adminUnitL2 "Antwerpen" ; + ns4:land "Belgi\u00EB" ; + ns4:verwijstNaar . + + rdf:type ns3:Address ; + ns2:uuid "57fea19d-27ce-4ecb-b3f6-581ce1f067e7" ; + "2" ; + "7" ; + ns3:thoroughfare "Paradeplein" ; + ns3:postCode "2500" ; + ns4:gemeentenaam "Lier" ; + ns3:fullAddress "Paradeplein 2 7, 2500 Lier, Belgi\u00EB" ; + ns3:adminUnitL2 "Antwerpen" ; + ns4:land "Belgi\u00EB" . + + rdf:type ns3:Address ; + ns2:uuid "91eccb9c2abe72ed7127af3d2b09e645" ; + "1" ; + ns3:thoroughfare "Limburgplein" ; + ns3:postCode "3500" ; + ns4:gemeentenaam "Hasselt" ; + ns3:fullAddress "Limburgplein 1, 3500 Hasselt, Belgi\u00EB" ; + ns3:adminUnitL2 "Limburg" ; + ns4:land "Belgi\u00EB" . +ns5:a5f58992810c9e8b7337c2990be2fab8 + rdf:type ns3:Address ; + ns2:uuid "a5f58992810c9e8b7337c2990be2fab8" ; + "73" ; + ns3:thoroughfare "Heirbaan" ; + ns3:postCode "8570" ; + ns4:gemeentenaam "Anzegem" ; + ns3:fullAddress "Heirbaan 73, 8570 Anzegem, Belgi\u00EB" ; + ns3:adminUnitL2 "West-Vlaanderen" ; + ns4:land "Belgi\u00EB" ; + ns4:verwijstNaar . +ns5:a78088dff8a75de324a3c01102caf671 + rdf:type ns3:Address ; + ns2:uuid "a78088dff8a75de324a3c01102caf671" ; + "66" ; + ns3:thoroughfare "Leopoldstraat" ; + ns3:postCode "8580" ; + ns4:gemeentenaam "Avelgem" ; + ns3:fullAddress "Leopoldstraat 66, 8580 Avelgem, Belgi\u00EB" ; + ns3:adminUnitL2 "West-Vlaanderen" ; + ns4:land "Belgi\u00EB" ; + ns4:verwijstNaar . +ns5:e9590a8d28a9b77be05a7a789b3571e5 + rdf:type ns3:Address ; + ns2:uuid "e9590a8d28a9b77be05a7a789b3571e5" ; + "1A" ; + ns3:thoroughfare "Limburgplein" ; + ns3:postCode "3500" ; + ns4:gemeentenaam "Hasselt" ; + ns3:fullAddress "Limburgplein 1A, 3500 Hasselt, Belgi\u00EB" ; + ns3:adminUnitL2 "Limburg" ; + ns4:land "Belgi\u00EB" . + + ns6:hasPrimarySite ns7:d3a88c997bc377fd0172d7555ef2f154 . + + ns6:hasPrimarySite . +ns8:a33cb6e858ea9fdd5cc8a6f6f97850094ce8f312b961ec6bd775c3dc024e4801 + ns6:hasPrimarySite ns7:d5283487-d4eb-4e57-afef-de1de153b42f . + + ns6:hasPrimarySite . + + rdf:type ns6:Site ; + ns2:uuid "866ca7d5975c853890ba18bb189892c4" ; + ns6:siteAddress ns9:cd895859-617f-4679-9d41-5d9437133280 ; + ns10:bestaatUit ns5:e9590a8d28a9b77be05a7a789b3571e5 ; + ns11:vestigingstype ns12:f1381723dec42c0b6ba6492e41d6f5dd . + + rdf:type ns6:Site ; + ns2:uuid "100a61965dc84e9b18a2dd1f1d7c81aa" ; + ns6:siteAddress , ; + ns10:bestaatUit ; + ns11:vestigingstype ns12:f1381723dec42c0b6ba6492e41d6f5dd . + + ns6:hasPrimarySite . +ns8:b4aa8ca2a4daa74ef8297b0b4dba2ad292e73da5337e20c65066860279751307 + ns6:hasPrimarySite . + + rdf:type ns6:Site ; + ns2:uuid "9f0d58d2127987435056229003e18b56" ; + ns6:siteAddress , ns9:fee82ba7-ad64-4310-9257-a99cf52494b0 ; + ns10:bestaatUit ns5:a78088dff8a75de324a3c01102caf671 ; + ns11:vestigingstype ns12:f1381723dec42c0b6ba6492e41d6f5dd . + + rdf:type ns6:Site ; + ns2:uuid "9d97ea7e82a9821a80c19e136afb2efc" ; + ns6:siteAddress , ; + ns10:bestaatUit ns5:a5f58992810c9e8b7337c2990be2fab8 ; + ns11:vestigingstype ns12:f1381723dec42c0b6ba6492e41d6f5dd . +ns7:d3a88c997bc377fd0172d7555ef2f154 + rdf:type ns6:Site ; + ns2:uuid "d3a88c997bc377fd0172d7555ef2f154" ; + ns6:siteAddress ns9:f7e104a5-84b5-4982-9d3d-d4bee9508601 ; + ns10:bestaatUit ; + ns11:vestigingstype ns12:f1381723dec42c0b6ba6492e41d6f5dd . +ns7:d5283487-d4eb-4e57-afef-de1de153b42f + rdf:type ns6:Site ; + ns2:uuid "d5283487-d4eb-4e57-afef-de1de153b42f" ; + ns6:siteAddress , ns9:f0dde9ef-4892-49d4-a8c9-2b5cac98b7c1 ; + ns10:bestaatUit ; + ns11:vestigingstype ns12:f1381723dec42c0b6ba6492e41d6f5dd . + + rdf:type ns1:ContactPoint ; + ns2:uuid "5def8bef-2029-403d-b80e-28a23638fe63" ; + foaf:page "https://www.nijlen.be/sociaal-2" ; + ns1:contactType "Primary" ; + ns1:email "info.ocmw@nijlen.be" ; + ns1:telephone "tel:+32 3 410 02 11" . + + rdf:type ns1:ContactPoint ; + ns2:uuid "87ef1d4c-d92d-4834-9ac3-d4bb3c8b9ad4" ; + ns1:contactType "Secondary" . + + rdf:type ns1:ContactPoint ; + ns2:uuid "7e3e2754-efa1-4122-a56e-331b3cab7d2d" ; + foaf:page "https://www.anzegem.be" ; + ns1:contactType "Primary" ; + ns1:email "info@anzegem.be" ; + ns1:telephone "tel:+3256694440" . +ns9:cd895859-617f-4679-9d41-5d9437133280 + rdf:type ns1:ContactPoint ; + ns2:uuid "cd895859-617f-4679-9d41-5d9437133280" ; + foaf:page "https://www.hasselt.be/nl/ocmw-sociale-dienst" ; + ns1:contactType "Primary" ; + ns1:email "info@ocmwhasselt.be" ; + ns1:telephone "tel:+3280090280" . +ns9:f0dde9ef-4892-49d4-a8c9-2b5cac98b7c1 + rdf:type ns1:ContactPoint ; + ns2:uuid "f0dde9ef-4892-49d4-a8c9-2b5cac98b7c1" ; + foaf:page "https://www.lier.be/stedelijk-ontwikkelingsbedrijf-lier-solag" ; + ns1:contactType "Primary" ; + ns1:email "info@solag.be" ; + ns1:telephone "tel:+3238000341" . +ns9:f7e104a5-84b5-4982-9d3d-d4bee9508601 + rdf:type ns1:ContactPoint ; + ns2:uuid "f7e104a5-84b5-4982-9d3d-d4bee9508601" ; + foaf:page "https://www.hasselt.be" ; + ns1:contactType "Primary" ; + ns1:email "info@hasselt.be" ; + ns1:telephone "tel:+3211239000" . +ns9:fee82ba7-ad64-4310-9257-a99cf52494b0 + rdf:type ns1:ContactPoint ; + ns2:uuid "fee82ba7-ad64-4310-9257-a99cf52494b0" ; + foaf:page "https://www.avelgem.be" ; + ns1:contactType "Primary" ; + ns1:email "info@avelgem.be" ; + ns1:telephone "tel:+3256653030" . + + rdf:type ns1:ContactPoint ; + ns2:uuid "66F543EA074D265E9ED3FF10" ; + ns1:contactType "Secondary" . + + rdf:type ns1:ContactPoint ; + ns2:uuid "669148366ABB62E36F847153" ; + ns1:contactType "Secondary" . diff --git a/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.graph b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.graph new file mode 100644 index 0000000..6685e9f --- /dev/null +++ b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.graph @@ -0,0 +1 @@ +http://mu.semte.ch/graphs/worship-service diff --git a/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.ttl b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.ttl new file mode 100644 index 0000000..3a792b2 --- /dev/null +++ b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241009161900-clb-prod-contactdata-worship.ttl @@ -0,0 +1,59 @@ +@prefix rdf: . +@prefix ns1: . +@prefix ns2: . +@prefix ns3: . +@prefix ns4: . +@prefix ns5: . +@prefix ns6: . +@prefix ns7: . +@prefix ns8: . + + + rdf:type ns1:Address ; + ns2:uuid "63639DA88DE5818A7C9F439C" ; + "50" ; + ns1:thoroughfare "Charles de Costerlaan" ; + ns1:postCode "2050" ; + ns3:gemeentenaam "Antwerpen" ; + ns1:fullAddress "Charles de Costerlaan 50, 2050 Antwerpen, Belgi\u00EB" ; + ns1:adminUnitL2 "Antwerpen" ; + ns3:land "Belgi\u00EB" . + + rdf:type ns1:Address ; + ns2:uuid "88f69d7d4753a63ca666c035c574813d" ; + "44" ; + ns1:thoroughfare "Westkapelse Steenweg" ; + ns1:postCode "8380" ; + ns3:gemeentenaam "Brugge" ; + ns1:fullAddress "Westkapelse Steenweg 44, 8380 Brugge, Belgi\u00EB" ; + ns1:adminUnitL2 "West-Vlaanderen" ; + ns3:land "Belgi\u00EB" . + + ns4:hasPrimarySite . + + rdf:type ns4:Site ; + ns2:uuid "43557b6bd03abd95ad981f3f611777c5" ; + ns4:siteAddress ; + ns5:bestaatUit ; + ns6:vestigingstype ns7:f1381723dec42c0b6ba6492e41d6f5dd . + + ns4:hasPrimarySite . + + rdf:type ns4:Site ; + ns2:uuid "63639DA88DE5818A7C9F439D" ; + ns4:siteAddress , ; + ns5:bestaatUit ; + ns6:vestigingstype ns7:f1381723dec42c0b6ba6492e41d6f5dd . + + rdf:type ns8:ContactPoint ; + ns2:uuid "6130D091375CFC000A000018" ; + ns8:contactType "Primary" . + + rdf:type ns8:ContactPoint ; + ns2:uuid "63639DA78DE5818A7C9F439B" ; + ns8:contactType "Secondary" . + + rdf:type ns8:ContactPoint ; + ns2:uuid "63639DA78DE5818A7C9F439A" ; + ns8:contactType "Primary" ; + ns8:telephone "tel:+32468208676" . diff --git a/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241011132019-fix--remove-spaces-in-phone-number.sparql b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241011132019-fix--remove-spaces-in-phone-number.sparql new file mode 100644 index 0000000..33c1ef7 --- /dev/null +++ b/config/migrations/2024/20241009143404-update-contact-data-from-clb/20241011132019-fix--remove-spaces-in-phone-number.sparql @@ -0,0 +1,9 @@ +DELETE { + GRAPH { + "tel:+32 3 410 02 11" . + } +} INSERT { + GRAPH { + "tel:+3234100211" . + } +}