Two Nifty Bash Profile Aliases

Ever get tired of typing the same commands over and over? Try adding these aliases to your .bash_profile and then never look back.

1. dbreloadall

alias dbreloadall="rake db:migrate:reset && rake db:migrate:reset RAILS_ENV=test && rake db:seed && rake db:seed RAILS_ENV=test"

Reset (drop, create, then migrate) then seed.

Should’ve called this dbnuke. Or dbregen. Or dbreincarnate. Or dbdeebee (personal fav). Name it whatever you’d like.

2. schemareload

alias schemareload="rm db/schema.rb && rake db:migrate"

Use this when you’re doing a git rebase and there’s a schema conflict.