Skip to content

Instantly share code, notes, and snippets.

@ohokay
Created March 14, 2009 06:41
Show Gist options
  • Select an option

  • Save ohokay/78998 to your computer and use it in GitHub Desktop.

Select an option

Save ohokay/78998 to your computer and use it in GitHub Desktop.
authlogic migration with all the hidden fields
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.string :name
t.string :email, :null => false
t.string :login, :null => false
t.string :state
t.integer :account_id, :null => false
t.string :crypted_password, :null => false
t.string :password_salt, :null => false
t.string :persistence_token, :null => false
t.string :single_access_token, :null => false
t.string :perishable_token, :null => false
t.integer :login_count, :default => 0
t.integer :failed_login_count, :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
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