Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete AGB Stekene #622

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Erediensten Dispatching from harvester, for OLV Temse [DL-6280]
- Includes 3 migrations and perform a restart such that dispatching is automatically started.
- Remove wrong labels for some bestuurseenheden. [DL-6323]
- Remove AGB Stekene. [OP-3409]

### Deploy notes

Expand Down
124 changes: 124 additions & 0 deletions config/migrations/2024/20241212193803-delete-agb-stekene.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Remove forward properties + mock person/account
DELETE {
GRAPH <http://mu.semte.ch/graphs/public> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifying <http://mu.semte.ch/graphs/public> here and in subsequent lines is to limit the deletion to the public graph and keep the data inside the op landing zone graph (<http://mu.semte.ch/graphs/landing-zone/op-public>).

?org ?orgP ?orgO .
}

GRAPH ?g {
?mockPerson ?mockPersonP ?mockPersonO .
?mockAccount ?mockAccountP ?mockAccountO .
}
}
WHERE {
BIND(<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> AS ?org)
BIND(<http://data.lblod.info/id/persoon/05ab337fad326fa39ecdfc2aa0bad35b> AS ?mockPerson)
BIND(<http://data.lblod.info/id/account/8bcc4a2df7d2f45274fdd911342795eb> AS ?mockAccount)

GRAPH <http://mu.semte.ch/graphs/public> {
?org ?orgP ?orgO .
}

GRAPH ?g {
?mockPerson ?mockPersonP ?mockPersonO .
?mockAccount ?mockAccountP ?mockAccountO .
}
}

;

# Remove bestuursorganen
DELETE {
GRAPH <http://mu.semte.ch/graphs/public> {
?bestuursorganen ?bestuursorganenP ?bestuursorganenO .
?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO .
}
}
WHERE {
VALUES ?bestuursorganen {
<http://data.lblod.info/id/bestuursorganen/24d8e602a8ddbe0adf3dea8c40277706>
<http://data.lblod.info/id/bestuursorganen/dad1789d9b9f8f6cb3c81cc2ca88154f>
<http://data.lblod.info/id/bestuursorganen/b90d16f2c8043bc20b88da232c0389fc>
<http://data.lblod.info/id/bestuursorganen/2f27a688e1728c1906a4bbd8670d7810>
}

VALUES ?bestuursorganenInTijd {
<http://data.lblod.info/id/bestuursorganen/c5bb7bca7363109b94b58b1aef6ed59c>
<http://data.lblod.info/id/bestuursorganen/8d43a29c6ed4a8af0cd43d4aba2c7014>
<http://data.lblod.info/id/bestuursorganen/f54979f47464bae1cc001788aedb8b86>
<http://data.lblod.info/id/bestuursorganen/c9a7d9130e1dd8f26ddb8c96fdd94c64>
}

GRAPH <http://mu.semte.ch/graphs/public> {
?bestuursorganen ?bestuursorganenP ?bestuursorganenO .
?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO .
}
}

;

# Remove bestuursorganen in tijd
DELETE {
GRAPH <http://mu.semte.ch/graphs/public> {
?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO .
}
}
WHERE {
VALUES ?bestuursorganenInTijd {
<http://data.lblod.info/id/bestuursorganen/c5bb7bca7363109b94b58b1aef6ed59c>
<http://data.lblod.info/id/bestuursorganen/8d43a29c6ed4a8af0cd43d4aba2c7014>
<http://data.lblod.info/id/bestuursorganen/f54979f47464bae1cc001788aedb8b86>
<http://data.lblod.info/id/bestuursorganen/c9a7d9130e1dd8f26ddb8c96fdd94c64>
}

GRAPH <http://mu.semte.ch/graphs/public> {
?bestuursorganenInTijd ?bestuursorganenInTijdP ?bestuursorganenInTijdO .
}
}

;

# Remove sessions
DELETE {
GRAPH <http://mu.semte.ch/graphs/sessions> {
?session ?sessionP ?sessionO .
}
}
WHERE {
BIND(<http://data.lblod.info/id/bestuurseenheden/8d6609b4-1a20-46b8-97ed-150c6d53acd6> AS ?org)

GRAPH <http://mu.semte.ch/graphs/sessions> {
?session <http://mu.semte.ch/vocabularies/ext/sessionGroup> ?org ;
?sessionP ?sessionO .
}
}

;

# Clear the org graph
CLEAR GRAPH <http://mu.semte.ch/graphs/organizations/8d6609b4-1a20-46b8-97ed-150c6d53acd6>

;

# Clear the toezichtGebruiker graph
CLEAR GRAPH <http://mu.semte.ch/graphs/organizations/8d6609b4-1a20-46b8-97ed-150c6d53acd6/LoketLB-toezichtGebruiker>

;

# Clear the personeelsbeheer graph
CLEAR GRAPH <http://mu.semte.ch/graphs/organizations/8d6609b4-1a20-46b8-97ed-150c6d53acd6/LoketLB-personeelsbeheer>

;

# Clear berichtenGebruiker graph with the exception of the `dataSource` property
DELETE {
GRAPH <http://mu.semte.ch/graphs/organizations/8d6609b4-1a20-46b8-97ed-150c6d53acd6/LoketLB-berichtenGebruiker> {
?s ?p ?o .
}
}
WHERE {
GRAPH <http://mu.semte.ch/graphs/organizations/8d6609b4-1a20-46b8-97ed-150c6d53acd6/LoketLB-berichtenGebruiker> {
?s ?p ?o .

FILTER (?p != <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#dataSource>)
}
}