diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-23 00:08:21 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-23 00:08:21 +0000 |
| commit | aaaa556ce9df9c3a8644f294f8ef6f0323b91e4e (patch) | |
| tree | 8a8ceef49f6026754c87e56252778cb4e1c27e1e /spec/db | |
| parent | e53eae82b097308623e77a69f8cc3138cca3cf68 (diff) | |
| download | gitlab-ce-aaaa556ce9df9c3a8644f294f8ef6f0323b91e4e.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/db')
| -rw-r--r-- | spec/db/schema_spec.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb index 189cde4de05..561f7b37199 100644 --- a/spec/db/schema_spec.rb +++ b/spec/db/schema_spec.rb @@ -11,8 +11,7 @@ RSpec.describe 'Database schema', feature_category: :database do IGNORED_INDEXES_ON_FKS = { slack_integrations_scopes: %w[slack_api_scope_id], - p_ci_builds_metadata: %w[partition_id], # composable FK, the columns are reversed in the index definition - p_ci_runner_machine_builds: %w[partition_id] # composable FK, the columns are reversed in the index definition + p_ci_builds_metadata: %w[partition_id] # composable FK, the columns are reversed in the index definition }.with_indifferent_access.freeze TABLE_PARTITIONS = %w[ci_builds_metadata].freeze @@ -318,7 +317,10 @@ RSpec.describe 'Database schema', feature_category: :database do # Check that each partitionable model with more than 1 column has the partition_id column at the trailing # position. Using PARTITIONABLE_MODELS instead of iterating tables since when partitioning existing tables, # the routing table only gets created after the PK has already been created, which would be too late for a check. - Ci::Partitionable::Testing::PARTITIONABLE_MODELS.each do |klass| + + skip_tables = %w[Ci::RunnerMachineBuild] + partitionable_models = Ci::Partitionable::Testing::PARTITIONABLE_MODELS + (partitionable_models - skip_tables).each do |klass| model = klass.safe_constantize table_name = model.table_name |
