summaryrefslogtreecommitdiff
path: root/db/migrate/20201110035029_created_index_for_vulnerability_occurrences_on_project_fingerprint.rb
blob: fed117d5f0870b04443752bf91c0fc87bd77eed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

class CreatedIndexForVulnerabilityOccurrencesOnProjectFingerprint < ActiveRecord::Migration[6.0]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false
  INDEX_NAME = 'index_vulnerability_occurrences_on_project_fingerprint'

  disable_ddl_transaction!

  def up
    add_concurrent_index :vulnerability_occurrences, :project_fingerprint, name: INDEX_NAME
  end

  def down
    remove_concurrent_index_by_name :vulnerability_occurrences, INDEX_NAME
  end
end