Skip to content

Instantly share code, notes, and snippets.

@DiveInto
Created March 30, 2012 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DiveInto/2252126 to your computer and use it in GitHub Desktop.
Save DiveInto/2252126 to your computer and use it in GitHub Desktop.
add field using rails generate
rails generate migration add_password_to_users encrypted_password:string
class AddPasswordToUsers < ActiveRecord::Migration
def self.up
add_column :users, :encrypted_password, :string
end
def self.down
remove_column :users, :encrypted_password
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment