Skip to content

Instantly share code, notes, and snippets.

@lzcabrera
Last active August 29, 2015 14:05
Show Gist options
  • Save lzcabrera/71dbb08d66719be1de38 to your computer and use it in GitHub Desktop.
Save lzcabrera/71dbb08d66719be1de38 to your computer and use it in GitHub Desktop.
rake db commands
rails g migration Add[*]And[#]To[TableName] *:string #:boolean
rails g migration Remove[*]From[TableName] *:integer
rake db:migrate
rake db:rollback
rake db:schema:dump
rake db:setup
# Migration commands
add_column
remove_column
rename_column
rename_table
drop_table
change_table
change_column_default
# More info
http://guides.rubyonrails.org/migrations.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment