Sha256: 69bb293368898ee0b2e3c0804854556ae73fe339c1f29cf15247bd54bf631cb9

Contents?: true

Size: 697 Bytes

Versions: 9

Compression:

Stored size: 697 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
  def change
    create_table :users do |t|
      t.string :email,           null: false, index: { unique: true }
      t.string :password_digest, null: false

      t.boolean :verified, null: false, default: false
      <%- if two_factor? %>
      t.boolean :otp_required_for_sign_in, null: false, default: false
      t.string  :otp_secret, null: false
      <%- end -%>
      <%- if webauthn? %>
      t.string :webauthn_id, null: false
      <%- end -%>
      <%- if omniauthable? %>
      t.string :provider
      t.string :uid
      <%- end -%>

      t.timestamps
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
authentication-zero-2.16.32 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.31 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.30 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.29 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.28 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.27 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.26 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.25 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.24 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt