2018-11-13 07:27:31 +00:00
|
|
|
class AddIndexesToRemoteMirror < ActiveRecord::Migration[4.2]
|
2018-05-03 14:19:21 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_concurrent_index :remote_mirrors, :last_successful_update_at unless index_exists?(:remote_mirrors, :last_successful_update_at)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2018-07-25 08:59:23 +00:00
|
|
|
# rubocop:disable Migration/RemoveIndex
|
2018-05-03 14:19:21 +00:00
|
|
|
remove_index :remote_mirrors, :last_successful_update_at if index_exists? :remote_mirrors, :last_successful_update_at
|
|
|
|
end
|
|
|
|
end
|