Sha256: 2d7fa8a3891d2c08a88ccff5d5e844e8dcadacae87f6d461e04cd602f721a28b

Contents?: true

Size: 444 Bytes

Versions: 22

Compression:

Stored size: 444 Bytes

Contents

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

      t.timestamps
    end

    add_index :<%= table_name %>, :email, unique: true
    add_index :<%= table_name %>, :session_token, unique: true
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
authentication-zero-0.0.2 lib/generators/authentication/templates/migration.rb.tt
authentication-zero-0.0.1 lib/generators/authentication/templates/migration.rb.tt