Sha256: ce493aa30e8de5beb80b91ff2cd85cfb765b0a97d42cddb04a9526334b6a2e32

Contents?: true

Size: 535 Bytes

Versions: 8

Compression:

Stored size: 535 Bytes

Contents

class CreateUsers < ActiveRecord::Migration
  def up
    create_table :users do |t|
      t.string :username,  null: false
      t.string :email, null: false
      t.string :password_digest, null: false
      t.string :reset_password_token
      t.datetime :reset_password_token_exp
      t.timestamps
    end

    add_index :users, :email,                unique: true
    add_index :users, :username,             unique: true
    add_index :users, :reset_password_token, unique: true
  end

  def down
    drop_table :users
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
token_authenticate_me-0.4.3 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.4.2 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.4.1 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.4.0 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.3.0 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.2.3 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.2.2 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb
token_authenticate_me-0.2.1 lib/generators/token_authenticate_me/models/templates/authentication_migration.rb