Commit 46fc54cf authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'clear-no-cross-foreign-keys' into 'master'

Empty allowed cross-database foreign keys

See merge request gitlab-org/gitlab!79427
parents 2fa08b8b 033bd993
...@@ -3,28 +3,12 @@ ...@@ -3,28 +3,12 @@
require 'spec_helper' require 'spec_helper'
RSpec.describe 'cross-database foreign keys' do RSpec.describe 'cross-database foreign keys' do
# TODO: We are trying to empty out this list in # Since we don't expect to have any cross-database foreign keys
# https://gitlab.com/groups/gitlab-org/-/epics/7249 . Once we are done we can # this is empty. If we will have an entry like
# keep this test and assert that there are no cross-db foreign keys. We # `ci_daily_build_group_report_results.project_id`
# should not be adding anything to this list but should instead only add new # should be added.
# loose foreign keys
# https://docs.gitlab.com/ee/development/database/loose_foreign_keys.html .
let(:allowed_cross_database_foreign_keys) do let(:allowed_cross_database_foreign_keys) do
%w( %w[].freeze
ci_build_report_results.project_id
ci_daily_build_group_report_results.group_id
ci_daily_build_group_report_results.project_id
ci_freeze_periods.project_id
ci_job_token_project_scope_links.added_by_id
ci_pending_builds.namespace_id
ci_pending_builds.project_id
ci_pipeline_schedules.owner_id
ci_resource_groups.project_id
ci_runner_namespaces.namespace_id
ci_running_builds.project_id
ci_stages.project_id
ci_unit_tests.project_id
).freeze
end end
def foreign_keys_for(table_name) def foreign_keys_for(table_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment