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
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20230914054914_index_finding_id_for_vulnerabilities_sync.rb')
-rw-r--r--db/post_migrate/20230914054914_index_finding_id_for_vulnerabilities_sync.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/post_migrate/20230914054914_index_finding_id_for_vulnerabilities_sync.rb b/db/post_migrate/20230914054914_index_finding_id_for_vulnerabilities_sync.rb
new file mode 100644
index 00000000000..37cd13a4dfa
--- /dev/null
+++ b/db/post_migrate/20230914054914_index_finding_id_for_vulnerabilities_sync.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class IndexFindingIdForVulnerabilitiesSync < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_vulnerabilities_on_finding_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :vulnerabilities, :finding_id, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME
+ end
+end