summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb')
-rw-r--r--db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb b/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb
new file mode 100644
index 00000000000..06be8edd707
--- /dev/null
+++ b/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class AddIdxVulnerabilityOccurrencesDedupAgain < Gitlab::Database::Migration[1.0]
+ TABLE = :vulnerability_occurrences
+ INDEX_NAME = 'index_vulnerability_occurrences_deduplication'
+ COLUMNS = %i[project_id report_type project_fingerprint]
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index TABLE, COLUMNS, name: INDEX_NAME
+ end
+
+ def down
+ # nothing to do here
+ end
+end