From f36e2ba706ee353733931b64c3877f4b46c2e33c Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Tue, 1 Feb 2022 18:04:19 +0100 Subject: [PATCH 01/19] bump frontend --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5c5e602..0468789 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,7 +158,7 @@ services: restart: always logging: *default-logging frontend: - image: lblod/frontend-contact-hub:1.5.2 + image: lblod/frontend-contact-hub:1.5.3 volumes: - ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf environment: From 5a318a99fed2946e1d820edf7531e6d9c4bfe7c1 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Wed, 2 Feb 2022 14:59:02 +0100 Subject: [PATCH 02/19] add contact types (#88) * add contact types * move migration to 2022 directory Co-authored-by: Nordine Bittich --- .../20220202120000-primary-contacts.sparql | 22 +++++++++++++++++ .../20220203100000-secondary-contacts.sparql | 24 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 config/migrations/2022/20220202120000-primary-contacts.sparql create mode 100644 config/migrations/2022/20220203100000-secondary-contacts.sparql diff --git a/config/migrations/2022/20220202120000-primary-contacts.sparql b/config/migrations/2022/20220202120000-primary-contacts.sparql new file mode 100644 index 0000000..89c771d --- /dev/null +++ b/config/migrations/2022/20220202120000-primary-contacts.sparql @@ -0,0 +1,22 @@ +# cf 20220110100000-secondary-contacts.sparql for context. +# In case it's not a secondary contactpoint (a contactpoint without an address if multiple contact points exist for one entity/mandataris) +PREFIX locn: +PREFIX schema: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?contactPoint + schema:contactType "Primary" + } +} +WHERE { + GRAPH { + ?contactPoint + a schema:ContactPoint. + FILTER NOT EXISTS { + ?contactPoint + schema:contactType "Secondary" + } + } +} \ No newline at end of file diff --git a/config/migrations/2022/20220203100000-secondary-contacts.sparql b/config/migrations/2022/20220203100000-secondary-contacts.sparql new file mode 100644 index 0000000..d6db186 --- /dev/null +++ b/config/migrations/2022/20220203100000-secondary-contacts.sparql @@ -0,0 +1,24 @@ +PREFIX locn: +PREFIX schema: +PREFIX rdf: +PREFIX rdfs: +INSERT { + GRAPH { + ?secondary + schema:contactType "Secondary" + } +} +WHERE { + GRAPH { + ?primary + a schema:ContactPoint; + locn:address ?a1; + schema:telephone ?t1. + ?mandataris schema:contactPoint ?primary, ?secondary. + ?secondary + schema:telephone ?t2. + FILTER NOT EXISTS { + ?secondary locn:address ?a2. + } + } +} \ No newline at end of file From cdf4417ca5f3edc8eb9fc05408a314eb9ae034e9 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Thu, 10 Feb 2022 14:09:17 +0100 Subject: [PATCH 03/19] bump frontend --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0468789..2179822 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,7 +158,7 @@ services: restart: always logging: *default-logging frontend: - image: lblod/frontend-contact-hub:1.5.3 + image: lblod/frontend-contact-hub:1.5.4 volumes: - ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf environment: From f8a59350044aa99299e8b2265f3f719608184835 Mon Sep 17 00:00:00 2001 From: Sam Van Campenhout Date: Tue, 1 Feb 2022 15:23:01 +0100 Subject: [PATCH 04/19] Add a type attribute to the contact-points model (#95) --- config/resources/domain.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/resources/domain.json b/config/resources/domain.json index 596699c..2a90c1d 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -210,6 +210,10 @@ "website": { "type": "uri", "predicate": "foaf:page" + }, + "type": { + "type": "string", + "predicate": "schema:contactType" } }, "relationships": { From 88226a90387d353a92fb36042e50d5bb177848fd Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Thu, 10 Feb 2022 16:01:33 +0100 Subject: [PATCH 05/19] bump frontend --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2179822..fa457ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,7 +158,7 @@ services: restart: always logging: *default-logging frontend: - image: lblod/frontend-contact-hub:1.5.4 + image: lblod/frontend-contact-hub:1.6.0 volumes: - ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf environment: From e744642b19ff1ccd7075be5909713eb8f29f1809 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Wed, 2 Mar 2022 17:06:43 +0100 Subject: [PATCH 06/19] reschedule op dump creation --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index db9e39f..1e99619 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -282,7 +282,7 @@ services: DUMP_FILE_CREATION_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations' INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations' HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations' - CRON_PATTERN_DUMP_JOB: '30 9 8-18/2 * * MON-FRI' # At second :30, at minute :09, every 2 hours between hours 08am and 18pm, every day between Monday and Friday, every month + CRON_PATTERN_DUMP_JOB: '42 * * * *' # At second :30, at minute :09, every 2 hours between hours 08am and 18pm, every day between Monday and Friday, every month CRON_PATTERN_HEALING_JOB: '0 0 4 * * *' # everyday at 4 AM START_INITIAL_SYNC: 'false' # prefer to disable it now. We want to have feeling with how the DB acts. labels: From 5c7833e53f6499cb56f7ae005a878e3c980f4ae4 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Wed, 2 Mar 2022 17:15:29 +0100 Subject: [PATCH 07/19] update comment --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 1e99619..848b6d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -282,7 +282,7 @@ services: DUMP_FILE_CREATION_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/deltaDumpFileCreation/organizations' INITIAL_PUBLICATION_GRAPH_SYNC_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/initialPublicationGraphSyncing/organizations' HEALING_JOB_OPERATION: 'http://redpencil.data.gift/id/jobs/concept/JobOperation/deltas/healingOperation/organizations' - CRON_PATTERN_DUMP_JOB: '42 * * * *' # At second :30, at minute :09, every 2 hours between hours 08am and 18pm, every day between Monday and Friday, every month + CRON_PATTERN_DUMP_JOB: '42 * * * *' # At minute 42 every hour CRON_PATTERN_HEALING_JOB: '0 0 4 * * *' # everyday at 4 AM START_INITIAL_SYNC: 'false' # prefer to disable it now. We want to have feeling with how the DB acts. labels: From dbf5fce41ea5260e01006337910942e26caacdc9 Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Thu, 3 Mar 2022 09:21:40 +0100 Subject: [PATCH 08/19] bump frontend & reduce nb threads for mu search indexing --- config/search/config.json | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/search/config.json b/config/search/config.json index f3d5ae4..78fe1ac 100644 --- a/config/search/config.json +++ b/config/search/config.json @@ -1,7 +1,7 @@ { "automatic_index_updates": true, "persist_indexes": true, - "number_of_threads": 10, + "number_of_threads": 6, "eager_indexing_groups": [ [{ "variables": [], "name": "acmidm-lezer" }], [{ "variables": [], "name": "acmidm-editeerder" }], diff --git a/docker-compose.yml b/docker-compose.yml index 848b6d3..dd4c91e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -159,7 +159,7 @@ services: restart: always logging: *default-logging frontend: - image: lblod/frontend-contact-hub:1.6.0 + image: lblod/frontend-contact-hub:1.6.3 volumes: - ./config/frontend/add-x-frame-options-header.conf:/config/add-x-frame-options.conf environment: From 890ff66cf3bc5a27134971d72da8e96456cf2aec Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Fri, 4 Mar 2022 14:13:07 +0100 Subject: [PATCH 09/19] Add dev migrations to dev docker-compose --- docker-compose.dev.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index cc6d251..61f384e 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -14,6 +14,8 @@ services: db: restart: "no" migrations: + volumes: + - ./config/dev-migrations:/data/migrations/dev/ restart: "no" resource: restart: "no" From 0e02373e9020e84dc43d0a51350f9241dcea46f9 Mon Sep 17 00:00:00 2001 From: Boris De Vloed Date: Fri, 4 Mar 2022 15:03:18 +0100 Subject: [PATCH 10/19] Optimize query performance - avoid thread kill --- ...0910120000-pseudonimize-UPDATE-BEFORE-RUNNING.sparql.disabled | 1 + 1 file changed, 1 insertion(+) diff --git a/config/dev-migrations/20210910120000-pseudonimize-UPDATE-BEFORE-RUNNING.sparql.disabled b/config/dev-migrations/20210910120000-pseudonimize-UPDATE-BEFORE-RUNNING.sparql.disabled index 8bf92c5..5f3fd90 100644 --- a/config/dev-migrations/20210910120000-pseudonimize-UPDATE-BEFORE-RUNNING.sparql.disabled +++ b/config/dev-migrations/20210910120000-pseudonimize-UPDATE-BEFORE-RUNNING.sparql.disabled @@ -42,6 +42,7 @@ DELETE { ?address adres:gemeentenaam ?gemeente_s. } } WHERE { + VALUES ?g { } GRAPH ?g { BIND("REPLACE_ME_WITH_A_RANDOM_STRING" AS ?salt). ?person a person:Person. From 334dcd822e51f011440fa56041e5a0162113d649 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Fri, 4 Mar 2022 15:51:09 +0100 Subject: [PATCH 11/19] Add migration to delete CKB Wachtebeke --- ...ete-centraal-kerkbestuur-wachtebeke.sparql | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql diff --git a/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql b/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql new file mode 100644 index 0000000..d982e7c --- /dev/null +++ b/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql @@ -0,0 +1,38 @@ +DELETE { + GRAPH ?g { + ?representatieveOrgaan ?bestuur . + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?representatieveOrgaan ?bestuur . + + ?bestuur ?primarySite ; + ?identifier ; + ?pbestuur ?obestuur . + + ?primarySite ?address ; + ?contactPoint ; + ?pprimarySite ?oprimarySite . + + ?address ?paddress ?oaddress . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + ?identifier ?structuredIdentifier ; + ?pidentifier ?oidentifier . + + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} + From 448b422185e10a2898c75ddd6f5292e4c053670a Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 10:32:00 +0100 Subject: [PATCH 12/19] Add migration to fix change event date --- ...92611-update-date-change-event-Zonhoven.sparql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql diff --git a/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql b/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql new file mode 100644 index 0000000..ced71d1 --- /dev/null +++ b/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql @@ -0,0 +1,15 @@ +PREFIX dct: + +DELETE { + GRAPH ?g { + dct:date "2021-11-28"^^xsd:date . + } +} INSERT { + GRAPH ?g { + dct:date "2021-12-20"^^xsd:date . + } +} WHERE { + GRAPH ?g { + dct:date "2021-11-28"^^xsd:date . + } +} From 35e67b88adf7c682574ec3170076f785275b2747 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 13:54:21 +0100 Subject: [PATCH 13/19] Add migration to update change event and status --- ...104523-update-change-event-glabbeek.sparql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql diff --git a/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql b/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql new file mode 100644 index 0000000..eb9d235 --- /dev/null +++ b/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql @@ -0,0 +1,26 @@ +PREFIX dct: +PREFIX regorg: + +DELETE { + GRAPH ?g { + + dct:date "2021-02-04"^^xsd:date . + + regorg:orgStatus . # Actief + } +} INSERT { + GRAPH ?g { + + dct:date "2022-02-04"^^xsd:date . + + regorg:orgStatus . # Niet Actief + + } +} WHERE { + GRAPH ?g { + + dct:date "2021-02-04"^^xsd:date . + + regorg:orgStatus . + } +} From 157cfa0daa46da0bfe40a9682641786b79490582 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 15:20:10 +0100 Subject: [PATCH 14/19] Add migration to remove duplicated organizations --- ...-remove-duplicated-bestuurseenheden.sparql | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql diff --git a/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql b/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql new file mode 100644 index 0000000..ce65032 --- /dev/null +++ b/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql @@ -0,0 +1,77 @@ +# Splitting the query in two because of execution time + +## Links to the bestuur + + + +DELETE { + GRAPH ?g { + ?representatieveOrgaan ?bestuur . + ?orgaanInTijd ?porgaanInTijd ?oorgaanInTijd . + ?orgaan ?porgaan ?oorgaan . + ?betrokken ?pbetrokken ?obetrokken . + ?eenheid ?betrokken . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?representatieveOrgaan ?bestuur . + + OPTIONAL { + ?orgaanInTijd ?bestuur ; + ?porgaanInTijd ?oorgaanInTijd . + + ?orgaan ?orgaanInTijd ; + ?porgaan ?oorgaan . + } + + OPTIONAL { + ?betrokken ?bestuur ; + ?pbetrokken ?obetrokken . + ?eenheid ?betrokken . + } + } +} + +; + +## Links from the bestuur + +DELETE { + GRAPH ?g { + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?bestuur ?primarySite ; + ?identifier ; + ?pbestuur ?obestuur . + + ?primarySite ?address ; + ?contactPoint ; + ?pprimarySite ?oprimarySite . + + ?address ?paddress ?oaddress . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + ?identifier ?structuredIdentifier ; + ?pidentifier ?oidentifier . + + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} \ No newline at end of file From 7fb39574a997c407563653f8c69d19bae1642853 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Tue, 8 Mar 2022 11:32:48 +0100 Subject: [PATCH 15/19] Remove werkingsgebieden from the config and db --- config/authorization/config.ex | 1 - .../administrative-units/export.json | 11 -------- .../delta-producer/organizations/export.json | 11 -------- config/dispatcher/dispatcher.ex | 4 --- ...20308092436-delete-werkingsgebieden.sparql | 10 +++++++ config/resources/domain.json | 27 ------------------- 6 files changed, 10 insertions(+), 54 deletions(-) create mode 100644 config/migrations/2022/20220308092436-delete-werkingsgebieden.sparql diff --git a/config/authorization/config.ex b/config/authorization/config.ex index 2befca8..d1784cb 100644 --- a/config/authorization/config.ex +++ b/config/authorization/config.ex @@ -23,7 +23,6 @@ defmodule Acl.UserGroups.Config do "http://www.w3.org/ns/org#ChangeEvent", "http://data.lblod.info/vocabularies/erediensten/BetrokkenLokaleBesturen", "http://data.lblod.info/vocabularies/erediensten/VerbondenJuridischeStructuren", - "http://www.w3.org/ns/prov#Location", "http://www.w3.org/ns/org#Site", "http://www.w3.org/ns/locn#Address", "http://www.w3.org/ns/person#Person", diff --git a/config/delta-producer/administrative-units/export.json b/config/delta-producer/administrative-units/export.json index d6dc195..d38b7b0 100644 --- a/config/delta-producer/administrative-units/export.json +++ b/config/delta-producer/administrative-units/export.json @@ -49,17 +49,6 @@ "http://www.w3.org/2004/02/skos/core#prefLabel", "http://www.w3.org/2004/02/skos/core#scopeNote" ] - }, - { - "type": "http://www.w3.org/ns/prov#Location", - "graphsFilter": [ - "http://mu.semte.ch/graphs/organisatieportaal" - ], - "properties": [ - "http://mu.semte.ch/vocabularies/core/uuid", - "http://www.w3.org/2000/01/rdf-schema#label", - "http://mu.semte.ch/vocabularies/ext/werkingsgebiedNiveau" - ] } ] } diff --git a/config/delta-producer/organizations/export.json b/config/delta-producer/organizations/export.json index 0d5a470..bb86cfb 100644 --- a/config/delta-producer/organizations/export.json +++ b/config/delta-producer/organizations/export.json @@ -306,17 +306,6 @@ "http://www.w3.org/2004/02/skos/core#prefLabel" ] }, - { - "type": "http://www.w3.org/ns/prov#Location", - "graphsFilter": [ - "http://mu.semte.ch/graphs/organisatieportaal" - ], - "properties": [ - "http://www.w3.org/2000/01/rdf-schema#label", - "http://mu.semte.ch/vocabularies/ext/werkingsgebiedNiveau", - "http://data.vlaanderen.be/ns/besluit#werkingsgebied" - ] - }, { "type": "http://lblod.data.gift/vocabularies/organisatie/TypeBetrokkenheid", "graphsFilter": [ diff --git a/config/dispatcher/dispatcher.ex b/config/dispatcher/dispatcher.ex index 9854ec6..b155a18 100644 --- a/config/dispatcher/dispatcher.ex +++ b/config/dispatcher/dispatcher.ex @@ -136,10 +136,6 @@ defmodule Dispatcher do Proxy.forward conn, path, "http://cache/organization-status-codes/" end - match "/locations/*path", %{ accept: [:json], layer: :api} do - Proxy.forward conn, path, "http://cache/locations/" - end - match "/involvement-types/*path", %{ accept: [:json], layer: :api} do Proxy.forward conn, path, "http://cache/involvement-types/" end diff --git a/config/migrations/2022/20220308092436-delete-werkingsgebieden.sparql b/config/migrations/2022/20220308092436-delete-werkingsgebieden.sparql new file mode 100644 index 0000000..84d672d --- /dev/null +++ b/config/migrations/2022/20220308092436-delete-werkingsgebieden.sparql @@ -0,0 +1,10 @@ +DELETE { + GRAPH ?g { + ?s ?p ?o . + } +} WHERE { + GRAPH ?g { + ?s a ; + ?p ?o . + } +} diff --git a/config/resources/domain.json b/config/resources/domain.json index 44a0268..f1bd579 100644 --- a/config/resources/domain.json +++ b/config/resources/domain.json @@ -370,11 +370,6 @@ "predicate": "ere:betrokkenBestuur", "target": "local-involvements", "cardinality": "many" - }, - "scope": { - "predicate": "besluit:werkingsgebied", - "target": "locations", - "cardinality": "one" } }, "new-resource-base": "http://data.lblod.info/id/bestuurseenheden/" @@ -666,28 +661,6 @@ "features": ["include-uri"], "new-resource-base": "http://lblod.data.gift/concepts/" }, - "locations": { - "class": "prov:Location", - "attributes": { - "label": { - "type": "string", - "predicate": "rdfs:label" - }, - "level": { - "type": "string", - "predicate": "ext:werkingsgebiedNiveau" - } - }, - "relationships": { - "administrative-units": { - "predicate": "besluit:werkingsgebied", - "target": "administrative-units", - "cardinality": "many", - "inverse": true - } - }, - "new-resource-base": "http://data.lblod.info/id/werkingsgebieden/" - }, "involvement-types": { "class": "code:TypeBetrokkenheid", "attributes": { From 3b6a5f8c4451d2e51b0db630102d039baf77193b Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Fri, 4 Mar 2022 15:51:09 +0100 Subject: [PATCH 16/19] Add migration to delete CKB Wachtebeke --- ...ete-centraal-kerkbestuur-wachtebeke.sparql | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql diff --git a/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql b/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql new file mode 100644 index 0000000..d982e7c --- /dev/null +++ b/config/migrations/2022/20220304152947-delete-centraal-kerkbestuur-wachtebeke.sparql @@ -0,0 +1,38 @@ +DELETE { + GRAPH ?g { + ?representatieveOrgaan ?bestuur . + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?representatieveOrgaan ?bestuur . + + ?bestuur ?primarySite ; + ?identifier ; + ?pbestuur ?obestuur . + + ?primarySite ?address ; + ?contactPoint ; + ?pprimarySite ?oprimarySite . + + ?address ?paddress ?oaddress . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + ?identifier ?structuredIdentifier ; + ?pidentifier ?oidentifier . + + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} + From 09fbb2d06a52a20d398bfc13f6a163170020ac36 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 10:32:00 +0100 Subject: [PATCH 17/19] Add migration to fix change event date --- ...92611-update-date-change-event-Zonhoven.sparql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql diff --git a/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql b/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql new file mode 100644 index 0000000..ced71d1 --- /dev/null +++ b/config/migrations/2022/20220307092611-update-date-change-event-Zonhoven.sparql @@ -0,0 +1,15 @@ +PREFIX dct: + +DELETE { + GRAPH ?g { + dct:date "2021-11-28"^^xsd:date . + } +} INSERT { + GRAPH ?g { + dct:date "2021-12-20"^^xsd:date . + } +} WHERE { + GRAPH ?g { + dct:date "2021-11-28"^^xsd:date . + } +} From d0473d35a2efc19f9eb53ace2fc180cb736e0365 Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 13:54:21 +0100 Subject: [PATCH 18/19] Add migration to update change event and status --- ...104523-update-change-event-glabbeek.sparql | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql diff --git a/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql b/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql new file mode 100644 index 0000000..eb9d235 --- /dev/null +++ b/config/migrations/2022/20220307104523-update-change-event-glabbeek.sparql @@ -0,0 +1,26 @@ +PREFIX dct: +PREFIX regorg: + +DELETE { + GRAPH ?g { + + dct:date "2021-02-04"^^xsd:date . + + regorg:orgStatus . # Actief + } +} INSERT { + GRAPH ?g { + + dct:date "2022-02-04"^^xsd:date . + + regorg:orgStatus . # Niet Actief + + } +} WHERE { + GRAPH ?g { + + dct:date "2021-02-04"^^xsd:date . + + regorg:orgStatus . + } +} From ab12f4e15bca4866fd38a45797d445df04e5393b Mon Sep 17 00:00:00 2001 From: Claire Lovisa Date: Mon, 7 Mar 2022 15:20:10 +0100 Subject: [PATCH 19/19] Add migration to remove duplicated organizations --- ...-remove-duplicated-bestuurseenheden.sparql | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql diff --git a/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql b/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql new file mode 100644 index 0000000..ce65032 --- /dev/null +++ b/config/migrations/2022/20220307140756-remove-duplicated-bestuurseenheden.sparql @@ -0,0 +1,77 @@ +# Splitting the query in two because of execution time + +## Links to the bestuur + + + +DELETE { + GRAPH ?g { + ?representatieveOrgaan ?bestuur . + ?orgaanInTijd ?porgaanInTijd ?oorgaanInTijd . + ?orgaan ?porgaan ?oorgaan . + ?betrokken ?pbetrokken ?obetrokken . + ?eenheid ?betrokken . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?representatieveOrgaan ?bestuur . + + OPTIONAL { + ?orgaanInTijd ?bestuur ; + ?porgaanInTijd ?oorgaanInTijd . + + ?orgaan ?orgaanInTijd ; + ?porgaan ?oorgaan . + } + + OPTIONAL { + ?betrokken ?bestuur ; + ?pbetrokken ?obetrokken . + ?eenheid ?betrokken . + } + } +} + +; + +## Links from the bestuur + +DELETE { + GRAPH ?g { + ?bestuur ?pbestuur ?obestuur . + ?primarySite ?pprimarySite ?oprimarySite . + ?address ?paddress ?oaddress . + ?contactPoint ?pcontactPoint ?ocontactPoint . + ?identifier ?pidentifier ?oidentifier . + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} WHERE { + GRAPH ?g { + VALUES ?bestuur { + + + } + + ?bestuur ?primarySite ; + ?identifier ; + ?pbestuur ?obestuur . + + ?primarySite ?address ; + ?contactPoint ; + ?pprimarySite ?oprimarySite . + + ?address ?paddress ?oaddress . + + ?contactPoint ?pcontactPoint ?ocontactPoint . + + ?identifier ?structuredIdentifier ; + ?pidentifier ?oidentifier . + + ?structuredIdentifier ?pstructuredIdentifier ?ostructuredIdentifier . + } +} \ No newline at end of file