Sha256: 5a78eebf45e4072440b3c1ba151a786164333fdd8fee0a16a5077871c0f2d279

Contents?: true

Size: 391 Bytes

Versions: 9

Compression:

Stored size: 391 Bytes

Contents

class TwoFactorAuthenticationAddToUsers < ActiveRecord::Migration
  def up
    change_table :users do |t|
      t.string   :otp_secret_key
      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

9 entries across 9 versions & 1 rubygems

Version Path
two_factor_authentication-2.1.1 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-2.1.0 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-2.0.1 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-2.0.0 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-1.1.5 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-1.1.4 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-1.1.3 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-1.1.1 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb
two_factor_authentication-1.1 spec/rails_app/db/migrate/20140407172619_two_factor_authentication_add_to_users.rb