2017-04-05 22:53:57 +00:00
|
|
|
# rubocop:disable RemoveIndex
|
2016-11-06 21:54:54 +00:00
|
|
|
class AddProjectImportDataProjectIndex < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
# Set this constant to true if this migration requires downtime.
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 16:08:53 +00:00
|
|
|
def up
|
2016-11-06 21:54:54 +00:00
|
|
|
add_concurrent_index :project_import_data, :project_id
|
|
|
|
end
|
2017-03-07 16:08:53 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :project_import_data, :project_id if index_exists? :project_import_data, :project_id
|
|
|
|
end
|
2016-11-06 21:54:54 +00:00
|
|
|
end
|