blob: 769f4c381795dece8498e6be68376667f08efaf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
class DropIndexUsersRequireTwoFactorAuthenticationFromGroup < Gitlab::Database::Migration[2.2]
milestone '16.7'
disable_ddl_transaction!
TABLE_NAME = :users
INDEX_NAME = :index_users_on_require_two_factor_authentication_from_group
def up
remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
end
def down
add_concurrent_index TABLE_NAME, :require_two_factor_authentication_from_group,
where: 'require_two_factor_authentication_from_group = TRUE',
name: INDEX_NAME
end
end
|