blob: 2140ff7b05ef585ec0ad17bd2f0346acb3cf7830 (
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
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
|