Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-15 09:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-15 09:10:25 +0300
commit4b4d8af30ad4a992a5fe538448636fd8aa4d0b6b (patch)
treec6146eaa803540f5bece71feb9e5f99713598e7c /spec/db
parent0555b45841cefbd64a7bff0d58f7cb3b5bd06d97 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/db')
-rw-r--r--spec/db/schema_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb
index 8ae59ee5adc..b2a62bcfbd6 100644
--- a/spec/db/schema_spec.rb
+++ b/spec/db/schema_spec.rb
@@ -170,8 +170,13 @@ RSpec.describe 'Database schema', feature_category: :database do
context 'columns ending with _id' do
let(:column_names) { columns.map(&:name) }
let(:column_names_with_id) { column_names.select { |column_name| column_name.ends_with?('_id') } }
- let(:foreign_keys_columns) { all_foreign_keys.reject { |fk| fk.name&.end_with?("_p") }.map(&:column).uniq } # we can have FK and loose FK present at the same time
let(:ignored_columns) { ignored_fk_columns(table) }
+ let(:foreign_keys_columns) do
+ all_foreign_keys
+ .reject { |fk| fk.name&.end_with?("_p") || fk.name&.end_with?("_id_convert_to_bigint") }
+ .map(&:column)
+ .uniq # we can have FK and loose FK present at the same time
+ end
it 'do have the foreign keys' do
expect(column_names_with_id - ignored_columns).to match_array(foreign_keys_columns)