Geo support for batched background migrations
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
A recent discussion brought up the topic of Geo support for database features (primarily background migrations).
After further discussion with the Geo team, there's a request to add support for batched background migrations, so they can use this for int->bigint column conversions.
Much of the preliminary work for multiple databases was already handled in #351585 (closed). I think for a first iteration of Geo support we could:
- Add the background migration tracking tables to the geo database
- Use the existing migration helpers from Geo migrations to write the tracking records into the Geo database
- Add a new worker for Geo, similar to
CiDatabaseWorkerfor thecidatabase, that optionally runs if the database is present
The main problem with this approach is managing schema changes for the tracking tables. This isn't a problem for main and ci since we intend to keep the schema in sync (at least for the immediate future). For Geo, we would have to ensure that we migrate the tables uniformly.
Alternatively, we could store the tracking data for Geo jobs on the main database, and control where we execute them as a separate parameter on the job, but I'm not sure that fits within the model that we've considered up until now.