Migration - harmonize date formats of change events (#562)
This commit is contained in:
@@ -10,12 +10,14 @@
|
||||
- Add URI to resource's organization responses
|
||||
- Fix query for organizations report [OP-3636]
|
||||
- Bump report-generation-service to most recent version
|
||||
- Write migration to harmonize date formats of change events [OP-3559]
|
||||
### Deploy notes
|
||||
```
|
||||
drc pull deltanotifier; drc up -d deltanotifier
|
||||
drc restart migrations-triggering-indexing resource
|
||||
drc pull frontend; drc up -d frontend
|
||||
drc pull report-generation; drc up -d report-generation
|
||||
drc restart migrations; drc logs -ft --tail=200 migrations
|
||||
```
|
||||
|
||||
## v1.33.3 (2025-07-04)
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
PREFIX org: <http://www.w3.org/ns/org#>
|
||||
PREFIX dcterms: <http://purl.org/dc/terms/>
|
||||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
|
||||
|
||||
DELETE {
|
||||
GRAPH ?g {
|
||||
?s dcterms:date ?oldDate .
|
||||
}
|
||||
}
|
||||
INSERT {
|
||||
GRAPH ?g {
|
||||
?s dcterms:date ?newDate .
|
||||
}
|
||||
}
|
||||
WHERE {
|
||||
GRAPH ?g {
|
||||
?s a org:ChangeEvent ;
|
||||
dcterms:date ?oldDate .
|
||||
FILTER(DATATYPE(?oldDate) != xsd:date)
|
||||
FILTER(?g IN (
|
||||
<http://mu.semte.ch/graphs/administrative-unit>,
|
||||
<http://mu.semte.ch/graphs/worship-service>
|
||||
))
|
||||
BIND(STRDT(SUBSTR(STR(?oldDate), 1, 10), xsd:date) AS ?newDate)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user