Sha256: f6bade2f45eaf78d11d07c776fe23f9275b905b74441fd8775f2bd65313aeb8d

Contents?: true

Size: 462 Bytes

Versions: 10

Compression:

Stored size: 462 Bytes

Contents

class TwoFactorAuthenticationAddToUsers < ActiveRecord::Migration[4.2]
  def up
    change_table :users do |t|
      t.string   :otp_secret_key
      t.string  :direct_otp
      t.datetime  :direct_otp_sent_at
      t.integer  :second_factor_attempts_count, :default => 0
    end

    add_index :users, :otp_secret_key, :unique => true
  end

  def down
    remove_column :users, :otp_secret_key
    remove_column :users, :second_factor_attempts_count
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
devise-multi-factor-3.2.5 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.2.4 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.2.3 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.2.2 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.2.1 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.2.0 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.1.8 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.1.7 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.1.6 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
devise-multi-factor-3.1.5 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb