2018-03-17 18:26:18 +05:30
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2019-01-03 12:48:30 +05:30
|
|
|
class AddTwoFactorColumnsToUsers < ActiveRecord::Migration
|
2017-08-17 22:00:37 +05:30
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_column_with_default(:users, :require_two_factor_authentication_from_group, :boolean, default: false)
|
|
|
|
add_column_with_default(:users, :two_factor_grace_period, :integer, default: 48)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column(:users, :require_two_factor_authentication_from_group)
|
|
|
|
remove_column(:users, :two_factor_grace_period)
|
|
|
|
end
|
|
|
|
end
|