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:

  1. 64 BBM records will be created in the batched_background_migrations table
  2. The BBM worker will execute the copyLayerMediaTypeIDToNewBigIntColumn work function
  3. Each partition will be processed independently with batches of 100,000 rows at 20k sub batches
  4. The media_type_id_convert_to_bigint column will be backfilled from media_type_id for all rows
  5. The existing trigger ensures new/updated rows stay in sync automatically
Edited by SAhmed

Merge request reports

Loading