2019-02-15 15:39:39 +05:30
|
|
|
class AddIndexesToProjectMirrorData < ActiveRecord::Migration[4.2]
|
2018-10-15 14:42:47 +05:30
|
|
|
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-11-18 11:00:15 +05:30
|
|
|
# rubocop:disable Migration/RemoveIndex
|
2018-10-15 14:42:47 +05:30
|
|
|
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
|