From 5ea8bfc46b4fbb075767874deeddbe6d731b60b2 Mon Sep 17 00:00:00 2001 From: Riad Abdallah Date: Thu, 9 Jan 2025 22:14:15 +0100 Subject: [PATCH 1/3] Completely remove `AGB Stekene` data A previous PR changed the org's status only; this PR completely removes its data. --- .../20250109200145-archive-agb-stekene.sparql | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 config/migrations-triggering-indexing/2025/20250109200145-archive-agb-stekene.sparql diff --git a/config/migrations-triggering-indexing/2025/20250109200145-archive-agb-stekene.sparql b/config/migrations-triggering-indexing/2025/20250109200145-archive-agb-stekene.sparql new file mode 100644 index 0000000..dbceb14 --- /dev/null +++ b/config/migrations-triggering-indexing/2025/20250109200145-archive-agb-stekene.sparql @@ -0,0 +1,196 @@ +DELETE { + GRAPH { + ?bestuursorganen ?bestuursorganenP ?bestuursorganenO . + } +} +WHERE { + VALUES ?bestuursorganen { + + + + + } + + GRAPH { + ?bestuursorganen ?bestuursorganenP ?bestuursorganenO . + } +} + +; + +DELETE { + GRAPH { + ?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO . + } +} +WHERE { + VALUES ?bestuursorganenInTijd { + + + + + } + + GRAPH { + ?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO . + } +} + +; + +DELETE { + GRAPH { + ?identifier ?identifierP ?identifierO . + } +} +WHERE { + VALUES ?identifier { + + + + } + + GRAPH { + ?identifier ?identifierP ?identifierO . + } +} + +; + +DELETE { + GRAPH { + ?structuredIdentifier ?structuredIdentifierP ?structuredIdentifierO . + } +} +WHERE { + VALUES ?structuredIdentifier { + + + + } + + GRAPH { + ?structuredIdentifier ?structuredIdentifierP ?structuredIdentifierO . + } +} + +; + +DELETE { + GRAPH { + ?site ?siteP ?siteO . + } +} +WHERE { + VALUES ?site { + + } + + GRAPH { + ?site ?siteP ?siteO . + } +} + +; + +DELETE { + GRAPH { + ?address ?addressP ?addressO . + } +} +WHERE { + VALUES ?address { + + } + + GRAPH { + ?address ?addressP ?addressO . + } +} + +; + +DELETE { + GRAPH { + ?contactPoint ?contactPointP ?contactPointO . + } +} +WHERE { + VALUES ?contactPoint { + + + } + + GRAPH { + ?contactPoint ?contactPointP ?contactPointO . + } +} + +; + +DELETE { + GRAPH { + ?parentOrganization ?organization . + } +} +WHERE { + BIND( AS ?organization) + BIND( AS ?parentOrganization) + + GRAPH { + ?parentOrganization ?organization . + } +} + +; + +DELETE { + GRAPH { + ?parentOrganization ?organization . + } +} +WHERE { + BIND( AS ?organization) + BIND( AS ?parentOrganization) + + GRAPH { + ?parentOrganization ?organization . + } +} + +; + +DELETE { + GRAPH { + ?membership ?p ?o. + } +} +WHERE { + BIND( AS ?organization) + + VALUES ?membershipP { + + + } + + GRAPH { + ?membership a ; + ?membershipP ?organization ; + ?p ?o . + } +} + +; + +DELETE { + GRAPH { + ?organization ?organizationP ?organizationO . + } +} +WHERE { + BIND( AS ?organization) + + GRAPH { + ?organization ?organizationP ?organizationO . + } +} From 71b8b636c242ad853eb153acc4626dbf6fe98328 Mon Sep 17 00:00:00 2001 From: Riad Abdallah Date: Fri, 17 Jan 2025 16:38:36 +0100 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b533746..6b8c005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ # Changelog +## Unreleased +### Backend +- Completely remove AGB Stekene's data. [OP-3409] +### Deploy Commands +``` +drc restart migrations-triggering-indexing && drc logs -ft --tail=200 migrations-triggering-indexing +``` ## 1.28.4 (2025-01-16) ### Backend #### Data From d70becf88f08f14cdcaf9866f57398ec25ffa9d0 Mon Sep 17 00:00:00 2001 From: Riad Abdallah Date: Fri, 17 Jan 2025 16:40:47 +0100 Subject: [PATCH 3/3] Add note on DEV-specific migration --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b8c005..f44e8e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## Unreleased ### Backend - Completely remove AGB Stekene's data. [OP-3409] -### Deploy Commands +### Deploy Notes +- Migration listed in [this comment](https://github.com/lblod/app-organization-portal/pull/491#issuecomment-2587185027) must run on the DEV environment. +#### Docker Commands ``` drc restart migrations-triggering-indexing && drc logs -ft --tail=200 migrations-triggering-indexing ```