Sha256: ac4e5e4cb978f2108654e9a06d654b1dfa2083a20b36ea3bdd5b5676cb2f391b

Contents?: true

Size: 645 Bytes

Versions: 40

Compression:

Stored size: 645 Bytes

Contents

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

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

      t.timestamps
    end

    add_index :users, :email, unique: true
    <%- if omniauthable? -%>
    add_index :users, [:provider, :uid], unique: true
    <%- end -%>
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
authentication-zero-2.16.20 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.19 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.18 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.17 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.16 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.15 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.14 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.13 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.12 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.11 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.10 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.9 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.8 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.7 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.6 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.5 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.4 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.3 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.2 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt
authentication-zero-2.16.1 lib/generators/authentication/templates/migrations/create_users_migration.rb.tt