diff options
Diffstat (limited to 'spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb b/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb index 2fa4c9e562f..c6cd5e55754 100644 --- a/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb +++ b/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb @@ -23,8 +23,6 @@ RSpec.describe 'cross-database foreign keys' do 'merge_requests.merge_user_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/422080 'merge_requests.author_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/422080 'project_authorizations.user_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/422044 - 'projects.creator_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/421844 - 'projects.marked_for_deletion_by_user_id', # https://gitlab.com/gitlab-org/gitlab/-/issues/421844 'user_group_callouts.user_id' # https://gitlab.com/gitlab-org/gitlab/-/issues/421287 ] end @@ -34,9 +32,11 @@ RSpec.describe 'cross-database foreign keys' do end def is_cross_db?(fk_record) - table_schemas = Gitlab::Database::GitlabSchema.table_schemas!([fk_record.from_table, fk_record.to_table]) + tables = [fk_record.from_table, fk_record.to_table] - !Gitlab::Database::GitlabSchema.cross_foreign_key_allowed?(table_schemas) + table_schemas = Gitlab::Database::GitlabSchema.table_schemas!(tables) + + !Gitlab::Database::GitlabSchema.cross_foreign_key_allowed?(table_schemas, tables) end it 'onlies have allowed list of cross-database foreign keys', :aggregate_failures do |