Sha256: e0e788895387a10dc8014b243a737a1a9edacad93d5a809ff4037c3e55c22ac5
Contents?: true
Size: 1020 Bytes
Versions: 2
Compression:
Stored size: 1020 Bytes
Contents
class DeviseTwoFactorAddToUsers < ActiveRecord::Migration[5.0] def self.up change_table :users do |t| t.string :otp_auth_secret t.string :otp_recovery_secret t.boolean :otp_enabled, default: false, null: false t.boolean :otp_mandatory, default: false, null: false t.datetime :otp_enabled_on t.integer :otp_failed_attempts, default: 0, null: false t.integer :otp_recovery_counter, default: 0, null: false t.string :otp_persistence_seed t.string :otp_session_challenge t.datetime :otp_challenge_expires end add_index :users, :otp_session_challenge, unique: true add_index :users, :otp_challenge_expires end def self.down change_table :users do |t| t.remove :otp_auth_secret, :otp_recovery_secret, :otp_enabled, :otp_mandatory, :otp_enabled_on, :otp_session_challenge, :otp_challenge_expires, :otp_failed_attempts, :otp_recovery_counter, :otp_persistence_seed end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
devise-2fa-0.2.1 | spec/dummy/db/migrate/20190312222952_devise_two_factor_add_to_users.rb |
devise-2fa-0.2.0 | spec/dummy/db/migrate/20190312222952_devise_two_factor_add_to_users.rb |