2017-08-17 22:00:37 +05:30
|
|
|
# rubocop:disable RemoveIndex
|
2016-06-16 23:09:34 +05:30
|
|
|
class AddIndexOnRequestedAtToMembers < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
DOWNTIME = false
|
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def up
|
2016-06-16 23:09:34 +05:30
|
|
|
add_concurrent_index :members, :requested_at
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :members, :requested_at if index_exists? :members, :requested_at
|
|
|
|
end
|
2016-06-16 23:09:34 +05:30
|
|
|
end
|