Draft: feat: batched migration for media_type bigint
Relates to #1708
Changes
This MR implements the batched background migration for backfilling the layers.media_type_id_convert_to_bigint column as part of Phase 1 of the Registry BBM Procedure for BIGINT media types column swap (Epic gitlab-org#19732).
Expected Behavior
When this migration runs:
- 64 BBM records will be created in the
batched_background_migrationstable - The BBM worker will execute the
copyLayerMediaTypeIDToNewBigIntColumnwork function - Each partition will be processed independently with batches of 100,000 rows at 20k sub batches
- The
media_type_id_convert_to_bigintcolumn will be backfilled frommedia_type_idfor all rows - The existing trigger ensures new/updated rows stay in sync automatically
Edited by SAhmed