2018-12-23 12:14:25 +05:30
|
|
|
class AddDefaultOtpRequiredForLoginValue < ActiveRecord::Migration[4.2]
|
2015-09-11 14:41:01 +05:30
|
|
|
def up
|
|
|
|
execute %q{UPDATE users SET otp_required_for_login = FALSE WHERE otp_required_for_login IS NULL}
|
|
|
|
|
|
|
|
change_column :users, :otp_required_for_login, :boolean, default: false, null: false
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
change_column :users, :otp_required_for_login, :boolean, null: true
|
|
|
|
end
|
|
|
|
end
|