Sha256: 7fa4283013d376724e5e5746098c4eb8b3a9022bfb144c0527d9f44a845fbd3b

Contents?: true

Size: 811 Bytes

Versions: 12

Compression:

Stored size: 811 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 -%>
      <%- if options.tenantable? %>
      t.references :account, null: false, foreign_key: true
      <%- end -%>

      t.timestamps
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
authentication-zero-4.0.3 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-4.0.2 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-4.0.1 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-4.0.0 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-3.0.2 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-3.0.1 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-3.0.0 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-3.0.0.alpha1 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.36 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.35 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.34 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.33 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt