2016-06-15 14:51:11 +00:00
|
|
|
class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-03-07 18:14:31 +00:00
|
|
|
DOWNTIME = false
|
|
|
|
|
2016-06-15 14:51:11 +00:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-03-07 16:08:53 +00:00
|
|
|
def up
|
2016-06-15 14:51:11 +00:00
|
|
|
add_concurrent_index :members, :requested_at
|
|
|
|
end
|
2017-03-07 16:08:53 +00:00
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :members, :requested_at if index_exists? :members, :requested_at
|
|
|
|
end
|
2016-06-15 14:51:11 +00:00
|
|
|
end
|