debian-mirror-gitlab/db/migrate/20170124193205_add_two_factor_columns_to_users.rb
2019-02-15 15:39:39 +05:30

19 lines
559 B
Ruby

# rubocop:disable Migration/UpdateLargeTable
class AddTwoFactorColumnsToUsers < ActiveRecord::Migration[4.2]
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