BigW Consortium Gitlab

20161106185620_add_project_import_data_project_index.rb 454 Bytes
Newer Older
1
# rubocop:disable RemoveIndex
2 3 4 5 6 7 8 9
class AddProjectImportDataProjectIndex < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  # Set this constant to true if this migration requires downtime.
  DOWNTIME = false

  disable_ddl_transaction!

10
  def up
11 12
    add_concurrent_index :project_import_data, :project_id
  end
13 14 15 16

  def down
    remove_index :project_import_data, :project_id if index_exists? :project_import_data, :project_id
  end
17
end