blob: e2061b5600acf88cb5d741a652ec35e886252237 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# rubocop:disable RemoveIndex
class AddIndexOnMergeRequestDiffCommitSha < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :merge_request_diff_commits, :sha, length: mysql_compatible_index_length
end
def down
remove_index :merge_request_diff_commits, :sha if index_exists? :merge_request_diff_commits, :sha
end
end
|