- Migrations to create the necessary merger change events that represent the
merger of several police zones into three new ones
- Migration to update the status of the merged police zones to not active
When new organisations were added for some merged municipalities (see PR #442)
their `org:hasSubOrganization` link with the province was inserted in to the
`<http://mu.semte.ch/graphs/administrative-unit>` graph instead of the
`<http://mu.semte.ch/graphs/shared>`.
Consequently, when logged in as a worship user and either of these
municipalities were selected in a form, the corresponding province was not
automatically filled in. This is due to the fact that worship users cannot read
from the `administrative-unit` graph.
This migration moves the appropriate `org:hasSubOrganization` triples to the
correct graph such that the behaviour for worship and non-worship users is the
same again.
This migration regenerates the `locn:fullAddress` triples for addresses in a
municipality involved in a merger. In essences this migration updates the
`locn:fullAddress` triple for each address changed by the migrations in the
previous commit.
Notes
- The migration is split over two queries, one for addresses without a box
number and one for addresses with a box number. This avoids complicating the
query with conditional logic at the cost of code duplication in the queries.
- In the existing full address triples two different notations are used to
separate the box and building number. OP currently separates them simply by a
space, which is what this migration matches for. But some historical data uses
a dash "-" to separate building and box number. Consequently, this migration
might match more address resources than strictly updated for the municipality
merges.
This migration updates the municipality name in the addresses for all
organisations located in a municipality whose name changes due to the 2025
municipality mergers.
As part of the 2025 municipality mergers Zwijndrecht will merge with Beveren and
Kruibeke into Beveveren-Kruibeke-Zwijndrecht. Additionally this means that
Zwijndrecht changes province from Antwerp to East Flanders.
This migration updates the province for each organisation with an address in
Zwijndrecht to East Flanders.
These migrations insert the merger change events that are needed for the 2025
municipality mergers.
The migrations executed by the `migrations` service insert the actual merger
change events for
- mergers where the resulting organisation is a new organisation (these were
added earlier in #442);
- mergers where the resulting organisation is an already existing, active
organisation; and
- the special case where the municipality Borsbeek is merging with the
municipality Antwerp, thereby creating a new district Borsbeek.
The migration executed by the `migrations-triggering-indexing` service updates
the status of the necessary organisations:
- the new municipalities/OCMWs/district are set from "Being founded" (nl. "In
oprichting") to "Active"
- the other municipalities are changed from "Active" to "Not active"
- organisations that simply remain active before and after the merger are *not*
updated
Set the end date for governing bodies for municipalities and OCMWs that are
involved in a municipality merger *and* will become inactive to 02 January 2025.
For the municipalities and OCMWs that remain active after the merger, the end
date has already been set previously.
As part of the 2025 municipality mergers 3 municipalities, and their
corresponding OCMWs, keep their original URI but do change their name. More
specifically:
- Bilzen becomes Bilzen-Hoeselt
- Ham becomes Tessenderlo-Ham
- Tongeren becomes Tongeren-Borgloon
It seems there were language tagged and non-languaged versions used
for the skos:notation from ADMS:identifier.
This migrations alings it, we don't want typed strings here.
See also DL-6343
A number of APBs were accidentally `org:linkedTo` all municipalities in
municipality and an APB for which:
- the APB is linked to more than 1 municipality; and
- the municipality does not match that of the APB's primary site.
The first condition avoids we remove `org:linkedTo` triples for APBs that were
created by the users, as these are only linked with a single municipality.
Originally the starting dates for the new governing bodies for the new
legislature was set to `2025-01-01` for all relevant municipalities, OCMWs,
districts, and provinces.
These migrations change that to more correct starting dates:
* For organisations that are **not** involved in mergers the new starting data
is `2024-12-02`, the first day installation meetings are allowed[1].
* For organisations that are involved in mergers the new starting date is
`2025-01-01`, the first work day of the new year on which the mergers take
effect. Note: this migration assumes there are no other start dates on
`2025-01-01`, so the migrations have to be run in the specified order.
[1] https://www.vlaanderen.be/lokaal-bestuur/organisatie-en-werking/gemeenteraad/installatie