summaryrefslogtreecommitdiff
path: root/db/post_migrate/20220109134455_add_idx_vulnerability_occurrences_dedup_again.rb
blob: 06be8edd7074cef6ae4a1175b34db57161e84a0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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