Skip to content

Allow only existing FKs to be exempted

Manoj M J requested to merge mmj-lfk-clean into master

What does this MR do and why?

This MR makes sure that only existing, concrete foreign keys can be listed in the allowed_cross_database_foreign_keys array in spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb spec.

This new assertion would prevent leftover entries in that array. For example, we would remove the foreign key via a migration, but would forget to remove it from the allowed_cross_database_foreign_keys array.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

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

Edited by Manoj M J

Merge request reports