Queue deployment_merge_requests bigint FK validations

What does this MR do and why?

Queues asynchronous validation for three confirmed-present foreign keys on deployment_merge_requests bigint shadow columns:

  • deployment_id_convert_to_bigint using fk_rails_dcbce9f4df_tmp
  • merge_request_id_convert_to_bigint using fk_rails_86a6d8bf12_tmp
  • environment_id_convert_to_bigint using fk_a064ff4453_tmp

The post-deployment migration runs only when all three shadow columns exist. Its down method unprepares all three validations.

The prepared bigint indexes have indisvalid=true and indisready=true. The foreign keys were confirmed ready for validation.

References

Screenshots or screen recordings

No UI changes.

How to set up and validate locally

The following checks passed:

  • RuboCop
  • Reek
  • ruby -c
  • scripts/validate_migration_checksum
  • git diff --check
  • Pre-commit hooks

No dedicated migration spec was added because schema-only post-deployment migrations are exempt.

MR acceptance checklist

  • The migration guards that all three shadow columns exist.
  • The rollback unprepares all three foreign key validations.
  • The prepared bigint indexes are valid and ready.
  • The foreign keys are ready for asynchronous validation.
  • Local validation passed.
  • No UI changes are included.

Merge request reports

Loading
Loading