blob: f6cbff24755c6d50d630a52db26dbd9ae680ab05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class RemoveTmpIndexIssuesOnIssueTypeAndIdOnlyIncidents < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
INDEX_NAME = 'tmp_index_issues_on_issue_type_and_id_only_incidents'
INCIDENT_ENUM_VALUE = 1
def up
remove_concurrent_index_by_name :issues, INDEX_NAME
end
def down
add_concurrent_index :issues, [:issue_type, :id], name: INDEX_NAME, where: "issue_type = #{INCIDENT_ENUM_VALUE}"
end
end
|