blob: 1b360b231a86fbef8c5711f55099855fba3dbddb (
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: Gitlab::Database.mysql? ? 20 : nil
end
def down
remove_index :merge_request_diff_commits, :sha if index_exists? :merge_request_diff_commits, :sha
end
end
|