Skip to content

Instantly share code, notes, and snippets.

@abams
Created May 2, 2014 02:46
Show Gist options
  • Save abams/1775e94bb561f7eb8891 to your computer and use it in GitHub Desktop.
Save abams/1775e94bb561f7eb8891 to your computer and use it in GitHub Desktop.
nuke() {
if [ "$1" = 'development' ] || [ "$1" = 'test' ]; then
RAILS_ENV=$1 be rake db:drop; RAILS_ENV=$1 be rake db:create; RAILS_ENV=$1 be rake db:migrate
RAILS_ENV=$1 be rake db:seed
fi
if [ "$1" = 'test' ]; then
RAILS_ENV=$1 be rake db:$1:prepare
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment