2017-01-30 20:50:47 +00:00
|
|
|
class AddIndexToProjectAuthorizations < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_concurrent_index(:project_authorizations, :project_id)
|
|
|
|
end
|
2017-03-14 06:36:33 +00:00
|
|
|
|
|
|
|
def down
|
2017-03-14 12:03:22 +00:00
|
|
|
remove_index(:project_authorizations, :project_id) if
|
|
|
|
Gitlab::Database.postgresql?
|
2017-03-14 06:36:33 +00:00
|
|
|
end
|
2017-01-30 20:50:47 +00:00
|
|
|
end
|