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>2022-06-20 14:10:13 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-20 14:10:13 +0300
commit0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch)
tree7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/db
parent72123183a20411a36d607d70b12d57c484394c8e (diff)
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/db')
-rw-r--r--spec/db/migration_spec.rb2
-rw-r--r--spec/db/schema_spec.rb16
2 files changed, 6 insertions, 12 deletions
diff --git a/spec/db/migration_spec.rb b/spec/db/migration_spec.rb
index ac649925751..7987c78b423 100644
--- a/spec/db/migration_spec.rb
+++ b/spec/db/migration_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe 'Migrations Validation' do
let(:all_migration_classes) do
{
2022_01_26_21_06_58.. => Gitlab::Database::Migration[2.0],
- 2021_09_01_15_33_24.. => Gitlab::Database::Migration[1.0],
+ 2021_09_01_15_33_24..2022_04_25_12_06_03 => Gitlab::Database::Migration[1.0],
2021_05_31_05_39_16..2021_09_01_15_33_24 => ActiveRecord::Migration[6.1],
..2021_05_31_05_39_16 => ActiveRecord::Migration[6.0]
}
diff --git a/spec/db/schema_spec.rb b/spec/db/schema_spec.rb
index e21c73976a8..2d8454988d9 100644
--- a/spec/db/schema_spec.rb
+++ b/spec/db/schema_spec.rb
@@ -47,7 +47,6 @@ RSpec.describe 'Database schema' do
events: %w[target_id],
forked_project_links: %w[forked_from_project_id],
geo_event_log: %w[hashed_storage_attachments_event_id],
- geo_lfs_object_deleted_events: %w[lfs_object_id],
geo_node_statuses: %w[last_event_id cursor_last_event_id],
geo_nodes: %w[oauth_application_id],
geo_repository_deleted_events: %w[project_id],
@@ -94,7 +93,10 @@ RSpec.describe 'Database schema' do
vulnerability_identifiers: %w[external_id],
vulnerability_scanners: %w[external_id],
security_scans: %w[pipeline_id], # foreign key is not added as ci_pipeline table will be moved into different db soon
- vulnerability_reads: %w[cluster_agent_id]
+ vulnerability_reads: %w[cluster_agent_id],
+ # See: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/87584
+ # Fixes performance issues with the deletion of web-hooks with many log entries
+ web_hook_logs: %w[web_hook_id]
}.with_indifferent_access.freeze
context 'for table' do
@@ -256,14 +258,6 @@ RSpec.describe 'Database schema' do
end
context 'primary keys' do
- let(:exceptions) do
- %i(
- elasticsearch_indexed_namespaces
- elasticsearch_indexed_projects
- merge_request_context_commit_diff_files
- )
- end
-
it 'expects every table to have a primary key defined' do
connection = ActiveRecord::Base.connection
@@ -271,7 +265,7 @@ RSpec.describe 'Database schema' do
!connection.primary_key(table).present?
end.map(&:to_sym)
- expect(problematic_tables - exceptions).to be_empty
+ expect(problematic_tables).to be_empty
end
end