blob: 698df712c11b3931010d8b6df362f891ccdff22f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class AddIndexOnMergeRequestDiffsMergeRequestIdAndId < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index(:merge_request_diffs, [:merge_request_id, :id])
end
def down
if index_exists?(:merge_request_diffs, [:merge_request_id, :id])
remove_concurrent_index(:merge_request_diffs, [:merge_request_id, :id])
end
end
end
|