2017-08-17 22:00:37 +05:30
|
|
|
# rubocop:disable RemoveIndex
|
2019-01-03 12:48:30 +05:30
|
|
|
class AddIndexForPipelineUserId < ActiveRecord::Migration
|
2016-08-24 12:49:21 +05:30
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
DOWNTIME = false
|
|
|
|
|
2016-08-24 12:49:21 +05:30
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def up
|
2016-08-24 12:49:21 +05:30
|
|
|
add_concurrent_index :ci_commits, :user_id
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :ci_commits, :user_id if index_exists? :ci_commits, :user_id
|
|
|
|
end
|
2016-08-24 12:49:21 +05:30
|
|
|
end
|