2018-05-02 13:35:04 +00:00
|
|
|
class AddIndexesToProjectMirrorData < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_concurrent_index :project_mirror_data, :jid
|
|
|
|
add_concurrent_index :project_mirror_data, :status
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2018-07-25 08:59:23 +00:00
|
|
|
# rubocop:disable Migration/RemoveIndex
|
2018-05-02 13:35:04 +00:00
|
|
|
remove_index :project_mirror_data, :jid if index_exists? :project_mirror_data, :jid
|
|
|
|
remove_index :project_mirror_data, :status if index_exists? :project_mirror_data, :status
|
|
|
|
end
|
|
|
|
end
|