Skip to content

Instantly share code, notes, and snippets.

@donnoman
Created November 8, 2009 01:33
Show Gist options
  • Save donnoman/229014 to your computer and use it in GitHub Desktop.
Save donnoman/229014 to your computer and use it in GitHub Desktop.
#migration to allow nulls for Authlogic Account Activation Tutorial
#http://www.claytonlz.com/index.php/2009/07/authlogic-account-activation-tutorial/
class AllowNullCryptedPassword < ActiveRecord::Migration
def self.up
change_column :users, :crypted_password, :string, :null => true
change_column :users, :password_salt, :string, :null => true
end
def self.down
change_column :users, :crypted_password, :string, :null => false
change_column :users, :password_salt, :string, :null => false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment