Skip to content

Commit

Permalink
internal(migration): move task statuses to more generic domain
Browse files Browse the repository at this point in the history
  • Loading branch information
elpoelma committed Dec 13, 2024
1 parent 6f97e10 commit ce1cb3b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-worms-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-reglementaire-bijlage": patch
---

Add migration which introduces more generic task status-URIs
25 changes: 25 additions & 0 deletions config/migrations/20241210133230-use-generic-task-statuses.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
PREFIX adms: <http://www.w3.org/ns/adms#>
PREFIX task: <http://redpencil.data.gift/vocabularies/tasks/>

DELETE {
GRAPH ?g {
?task adms:status ?oldStatus.
}
}
INSERT {
GRAPH ?g {
?task adms:status ?newStatus.
}
}
WHERE {
GRAPH ?g {
?task a task:Task;
adms:status ?oldStatus.
VALUES (?oldStatus ?newStatus) {
(<http://lblod.data.gift/besluit-publicatie-melding-statuses/created> <http://redpencil.data.gift/id/concept/JobStatus/scheduled>)
(<http://lblod.data.gift/besluit-publicatie-melding-statuses/ongoing> <http://redpencil.data.gift/id/concept/JobStatus/busy>)
(<http://lblod.data.gift/besluit-publicatie-melding-statuses/success> <http://redpencil.data.gift/id/concept/JobStatus/success>)
(<http://lblod.data.gift/besluit-publicatie-melding-statuses/failure> <http://redpencil.data.gift/id/concept/JobStatus/failed>)
}
}
}

0 comments on commit ce1cb3b

Please sign in to comment.