Skip to content

Instantly share code, notes, and snippets.

@eddorre
Created February 26, 2010 01:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eddorre/315295 to your computer and use it in GitHub Desktop.
Save eddorre/315295 to your computer and use it in GitHub Desktop.
function migrate() {
if [[ $1 == '' ]]; then
rake db:migrate RAILS_ENV=development && rake db:migrate RAILS_ENV=test
else
rake db:migrate RAILS_ENV=$1
fi
}
function rollback() {
if [[ $1 == '' ]]; then
rake db:rollback RAILS_ENV=development && rake db:rollback RAILS_ENV=test
else
rake db:rollback RAILS_ENV=$1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment