blob: 318d9e8a218b3cc9340b212397545ed3649c924e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# frozen_string_literal: true
class AddIndexIssuesOnProjectIdAndStateIdAndCreatedAtAndId < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_NAME = 'index_issues_on_project_id_and_state_id_and_created_at_and_id'
disable_ddl_transaction!
def up
add_concurrent_index :issues, [:project_id, :state_id, :created_at, :id], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :issues, INDEX_NAME
end
end
|