Validate tag_gpg_signatures project_id foreign key

What does this MR do and why?

Contributes to !238703 (merged)

Problem

The tag_gpg_signatures.project_id foreign key was replaced with ON DELETE CASCADE in !238703 (merged) using validate: false and asynchronous validation. The FK remains marked as NOT VALID in PostgreSQL until synchronously validated.

Solution

Add a post-deployment migration that calls validate_foreign_key to synchronously validate the fk_ebf091e1c4 constraint, completing the two-step FK replacement process.

References

Screenshots or screen recordings

Not applicable — no UI changes.

How to set up and validate locally

  1. Run bundle exec rails db:migrate.
  2. Confirm db/structure.sql updates the tag_gpg_signatures.project_id foreign key from ON DELETE CASCADE NOT VALID to ON DELETE CASCADE.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading