Skip to content

Instantly share code, notes, and snippets.

@jonpaul
Created November 9, 2011 20:22
Show Gist options
  • Save jonpaul/1352862 to your computer and use it in GitHub Desktop.
Save jonpaul/1352862 to your computer and use it in GitHub Desktop.
class AddDeviseToUsers < ActiveRecord::Migration
def self.up
change_table :users do |t|
t.recoverable
t.rememberable
t.trackable
t.validatable
t.lockable
t.timeoutable
end
end
def self.down
change_table :users do |t|
t.remove :encrypted_password
t.remove :password_salt
t.remove :authentication_token
t.remove :confirmation_token
t.remove :confirmed_at
t.remove :confirmation_sent_at
t.remove :reset_password_token
t.remove :reset_password_sent_at
t.remove :remember_token
t.remove :remember_created_at
t.remove :sign_in_count
t.remove :current_sign_in_at
t.remove :last_sign_in_at
t.remove :current_sign_in_ip
t.remove :last_sign_in_ip
t.remove :failed_attempts
t.remove :unlock_token
t.remove :locked_at
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment