Sha256: 7bb6690a9dfcc6833cecebb537f87fa463d8c24e3ff788cf845e1984775f8d47

Contents?: true

Size: 675 Bytes

Versions: 5

Compression:

Stored size: 675 Bytes

Contents

class TwoFactorAuthenticationAddTo<%= table_name.camelize %> < ActiveRecord::Migration
  def change
    add_column :<%= table_name %>, :second_factor_attempts_count, :integer, default: 0
    add_column :<%= table_name %>, :encrypted_otp_secret_key, :string
    add_column :<%= table_name %>, :encrypted_otp_secret_key_iv, :string
    add_column :<%= table_name %>, :encrypted_otp_secret_key_salt, :string
    add_column :<%= table_name %>, :direct_otp, :string
    add_column :<%= table_name %>, :direct_otp_sent_at, :datetime
    add_column :<%= table_name %>, :totp_timestamp, :timestamp

    add_index :<%= table_name %>, :encrypted_otp_secret_key, unique: true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
two_factor_authentication-2.2.0 lib/generators/active_record/templates/migration.rb
two_factor_authentication-2.1.1 lib/generators/active_record/templates/migration.rb
two_factor_authentication-2.1.0 lib/generators/active_record/templates/migration.rb
two_factor_authentication-2.0.1 lib/generators/active_record/templates/migration.rb
two_factor_authentication-2.0.0 lib/generators/active_record/templates/migration.rb