Sha256: 86f0f5352960316f6a92fa40fe81f08648daa56b468f2259c1b6314a905bef3f

Contents?: true

Size: 1015 Bytes

Versions: 1

Compression:

Stored size: 1015 Bytes

Contents

class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.string    :login,               :null => false 
      t.string    :email,               :null => false
      t.string    :crypted_password,    :null => false
      t.string    :password_salt,       :null => false
      t.string    :persistence_token,   :null => false  # required
      t.string    :perishable_token,    :null => false 
      t.integer   :login_count,         :null => false, :default => 0
      t.integer   :failed_login_count,  :null => false, :default => 0 
      t.datetime  :last_request_at 
      t.datetime  :current_login_at
      t.datetime  :last_login_at  
      t.string    :current_login_ip
      t.string    :last_login_ip
      t.timestamps
    end
    
    add_index :users, :login
    add_index :users, :email
    add_index :users, :persistence_token
    add_index :users, :perishable_token
    add_index :users, :last_request_at
  end

  def self.down
    drop_table :users
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
base_rails_app-0.0.1 lib/db/migrate/20090809175903_create_users.rb