blob: 76753cdd73782e833521bffad3e76af1dd521906 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class AddProjectIdStateSeverityDefaultBranchIndexForVulnerabilities < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
INDEX_NAME = 'index_vulnerabilities_project_id_state_severity_default_branch'
def up
add_concurrent_index :vulnerabilities, [:project_id, :state, :severity, :present_on_default_branch],
name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :vulnerabilities, INDEX_NAME
end
end
|