2015-06-20 23:40:48 +00:00
|
|
|
class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration
|
|
|
|
def up
|
2015-06-22 15:36:11 +00:00
|
|
|
execute %q{UPDATE users SET otp_required_for_login = FALSE WHERE otp_required_for_login IS NULL}
|
|
|
|
|
2015-06-20 23:40:48 +00:00
|
|
|
change_column :users, :otp_required_for_login, :boolean, default: false, null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2015-06-22 15:36:11 +00:00
|
|
|
change_column :users, :otp_required_for_login, :boolean, null: true
|
2015-06-20 23:40:48 +00:00
|
|
|
end
|
|
|
|
end
|