Skip to content

Instantly share code, notes, and snippets.

@mrichman
Created November 30, 2009 01:43
Show Gist options
  • Select an option

  • Save mrichman/245202 to your computer and use it in GitHub Desktop.

Select an option

Save mrichman/245202 to your computer and use it in GitHub Desktop.
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :login
t.string :email
t.boolean :active, :default => true
t.boolean :confirmed, :default => false
t.string :crypted_password
t.string :password_salt
t.string :persistence_token
t.string :perishable_token
t.integer :login_count
t.datetime :last_request_at
t.datetime :last_login_at
t.datetime :current_login_at
t.string :last_login_ip
t.string :current_login_ip
t.timestamps
end
end
def self.down
drop_table :users
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment