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
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
I also had to bump mu-search, I was getting HTTP 500 errors otherwise
(NoMethodError - undefined method `each' for nil:NilClass)
About the mandates creation:
- LidVanRechtswege : shared mandate for all the organen in time
- Bestuursleden big half : shared with 2023-2026 because 2020 was the start of a big half
- Bestuursleden small half : new mandate (should have been shared with 2017-2020, but we don't have this time period)
- Voorzitter : new mandate
- Secretaris : new mandate
- Penningmeester : new mandate