Prepare deployment_merge_requests for bigint column swaps

What does this MR do and why?

Prepares deployment_merge_requests to swap deployment_id, merge_request_id, and environment_id from integer to bigint. It finalizes the backfill, ensures bigint indexes exist, and adds three NOT VALID foreign keys to parent id columns.

To avoid blocking deployments during anti-wraparound vacuums, migrations skip on GitLab.com when either table is affected. Missing foreign keys will be retried before validation in a follow-up.

References

Screenshots or screen recordings

Not applicable. No UI changes.

How to set up and validate locally

  1. Run scripts/regenerate-schema.
  2. Run migration specs.

Tested against a production-shaped local table, including vacuum-skip behavior and rollback.

MR acceptance checklist

Requires database review, index-validity confirmation, and database migration pipeline results.

Edited by Marius Bobin

Merge request reports

Loading
Loading