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>2021-03-16 21:18:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/db
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/db')
-rw-r--r--spec/db/schema_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb
index b2c77a06f19..d292ba60a12 100644
--- a/spec/db/schema_spec.rb
+++ b/spec/db/schema_spec.rb
@@ -87,7 +87,8 @@ RSpec.describe 'Database schema' do
users_star_projects: %w[user_id],
vulnerability_identifiers: %w[external_id],
vulnerability_scanners: %w[external_id],
- web_hooks: %w[group_id]
+ web_hooks: %w[group_id],
+ web_hook_logs_part_0c5294f417: %w[web_hook_id]
}.with_indifferent_access.freeze
context 'for table' do
@@ -102,7 +103,12 @@ RSpec.describe 'Database schema' do
context 'all foreign keys' do
# for index to be effective, the FK constraint has to be at first place
it 'are indexed' do
- first_indexed_column = indexes.map(&:columns).map(&:first)
+ first_indexed_column = indexes.map(&:columns).map do |columns|
+ # In cases of complex composite indexes, a string is returned eg:
+ # "lower((extern_uid)::text), group_id"
+ columns = columns.split(',') if columns.is_a?(String)
+ columns.first.chomp
+ end
foreign_keys_columns = foreign_keys.map(&:column)
# Add the primary key column to the list of indexed columns because