2018-11-13 07:27:31 +00:00
|
|
|
class AddIndexForHeadPipelineMergeRequest < ActiveRecord::Migration[4.2]
|
2017-06-19 14:52:57 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_concurrent_index :merge_requests, :head_pipeline_id
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_concurrent_index :merge_requests, :head_pipeline_id if index_exists?(:merge_requests, :head_pipeline_id)
|
|
|
|
end
|
|
|
|
end
|