2016-07-15 13:46:49 +00:00
|
|
|
class AddIndexForPipelineUserId < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-03-07 18:14:31 +00:00
|
|
|
DOWNTIME = false
|
|
|
|
|
2016-07-18 12:01:57 +00:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 16:08:53 +00:00
|
|
|
def up
|
2016-07-15 16:01:43 +00:00
|
|
|
add_concurrent_index :ci_commits, :user_id
|
2016-07-15 13:46:49 +00:00
|
|
|
end
|
2017-03-07 16:08:53 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :ci_commits, :user_id if index_exists? :ci_commits, :user_id
|
|
|
|
end
|
2016-07-15 13:46:49 +00:00
|
|
|
end
|