2020-10-18 01:39:46 -07:00
|
|
|
class AddOtpSecretKeyToUsers < ActiveRecord::Migration[5.2]
|
|
|
|
def change
|
|
|
|
add_column :users, :otp_secret_key, :string
|
2020-10-18 02:39:28 -07:00
|
|
|
add_column :users, :otp_module, :integer
|
|
|
|
|
|
|
|
User.find_each do |user|
|
|
|
|
user.update_attribute(:otp_secret_key, User.otp_random_secret)
|
|
|
|
end
|
2020-10-18 01:39:46 -07:00
|
|
|
end
|
|
|
|
end
|