2017-02-10 08:01:23 +00:00
|
|
|
class AddIndexToCiTriggerRequestsForCommitId < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 16:08:53 +00:00
|
|
|
def up
|
2017-02-10 08:01:23 +00:00
|
|
|
add_concurrent_index :ci_trigger_requests, :commit_id
|
|
|
|
end
|
2017-03-07 16:08:53 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :ci_trigger_requests, :commit_id if index_exists? :ci_trigger_requests, :commit_id
|
|
|
|
end
|
2017-02-10 08:01:23 +00:00
|
|
|
end
|