debian-mirror-gitlab/db/migrate/20170619144837_add_index_for_head_pipeline_merge_request.rb
2019-02-15 15:39:39 +05:30

15 lines
380 B
Ruby

class AddIndexForHeadPipelineMergeRequest < ActiveRecord::Migration[4.2]
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