Backport of 'Reorder deployments bigint cleanup so the FK sorts first'

What does this MR do and why?

This is a backport to the 19.3 stable branch of !251142 (merged). It swaps the timestamp prefixes of two post-deployment migrations so the temporary foreign key removal on deployments sorts before the removal of the indexes supporting it. RemoveTmpBigintFkForDeploymentsPhaseTwoRetryTwo moves from 20260811082241 to 20260731085558, and DropTmpBigintIndexesAndFkForDeploymentsPhaseTwo moves from 20260731085558 to 20260811082241. Class names and migration bodies are unchanged.

The rule comes from doc/development/database/foreign_keys.md: foreign keys must be removed before removing the indexes supporting them. Without the index, Postgres does a full table scan each time a row is deleted from the referenced table. In production the index removals succeeded and the removal of fk_b9a3851b82_tmp did not take effect, so project and group deletions were blocked by full table scans on deployments.

Risk

  • Rename only. Both files keep their class names and bodies, and the content is byte-identical, verified through git blob hashes.
  • No db/schema_migrations/ checksum files change, because all four timestamps already exist and are reused rather than created. No db/structure.sql change, since it carries no migration versions.
  • The cherry-pick applied cleanly to the stable branch.
  • Every installation that already ran these migrations has all four versions recorded, so none of them run again and behavior does not change. The reorder only affects installations running the 19.3 migrations from this point forward.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
  • Required labels have been applied to this merge request
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, request help in the #s_developer_experience Slack channel to confirm the failures are unrelated to the merge request.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

References

Edited by Marius Bobin

Merge request reports

Loading
Loading