2017-11-17 13:38:14 +00:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2018-11-13 07:27:31 +00:00
|
|
|
class AddTwoFactorColumnsToUsers < ActiveRecord::Migration[4.2]
|
2017-01-24 21:09:58 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
2017-03-14 13:34:21 +00:00
|
|
|
add_column_with_default(:users, :require_two_factor_authentication_from_group, :boolean, default: false)
|
2017-01-24 21:09:58 +00:00
|
|
|
add_column_with_default(:users, :two_factor_grace_period, :integer, default: 48)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2017-03-14 13:34:21 +00:00
|
|
|
remove_column(:users, :require_two_factor_authentication_from_group)
|
2017-01-24 21:09:58 +00:00
|
|
|
remove_column(:users, :two_factor_grace_period)
|
|
|
|
end
|
|
|
|
end
|