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/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-28 06:08:46 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-28 06:08:46 +0300
commit40a8d9a482e10a5f337b19c07d2f93bd8f90851b (patch)
treed90077142ed5e74ef2633a2071a88c33fda9977e /db
parent6ef57128d73e6f3d36af042a6b38d4779fda8b6d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20230727115635_index_vulnerability_reads_on_project_id_and_vulnerability_id.rb15
-rw-r--r--db/schema_migrations/202307271156351
-rw-r--r--db/structure.sql2
3 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20230727115635_index_vulnerability_reads_on_project_id_and_vulnerability_id.rb b/db/post_migrate/20230727115635_index_vulnerability_reads_on_project_id_and_vulnerability_id.rb
new file mode 100644
index 00000000000..379dfe6e42d
--- /dev/null
+++ b/db/post_migrate/20230727115635_index_vulnerability_reads_on_project_id_and_vulnerability_id.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class IndexVulnerabilityReadsOnProjectIdAndVulnerabilityId < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_vulnerability_reads_on_project_id_and_vulnerability_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :vulnerability_reads, [:project_id, :vulnerability_id], name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :vulnerability_reads, INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20230727115635 b/db/schema_migrations/20230727115635
new file mode 100644
index 00000000000..1e432fb2539
--- /dev/null
+++ b/db/schema_migrations/20230727115635
@@ -0,0 +1 @@
+192ccfdaa3957d429ae546bf6cc38b92e9f39567ca860772fb7f777de1716cb4 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 80261e7b687..dcf9d45b1a6 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -33624,6 +33624,8 @@ CREATE INDEX index_vulnerability_reads_on_location_image_trigram ON vulnerabilit
CREATE INDEX index_vulnerability_reads_on_namespace_type_severity_id ON vulnerability_reads USING btree (namespace_id, report_type, severity, vulnerability_id);
+CREATE INDEX index_vulnerability_reads_on_project_id_and_vulnerability_id ON vulnerability_reads USING btree (project_id, vulnerability_id);
+
CREATE INDEX index_vulnerability_reads_on_scanner_id ON vulnerability_reads USING btree (scanner_id);
CREATE UNIQUE INDEX index_vulnerability_reads_on_uuid ON vulnerability_reads USING btree (uuid);