blob: 46809ca170790fe3c65deec1f6ff572607c80672 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# rubocop:disable RemoveIndex
class AddProjectImportDataProjectIndex < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :project_import_data, :project_id
end
def down
remove_index :project_import_data, :project_id if index_exists? :project_import_data, :project_id
end
end
|