git - Rails 3 and Heroku: automatically "rake db:migrate" on push? -
i have slight annoyance heroku push/deploy process, otherwise has been joy discover , use.
if add new migration app, way can onto heroku server push heroku remote. uploads , restarts app. doesn't run migration, have heroku rake db:migrate --app myapp
, heroku restart --app myapp
. in meantime, app broken because hasn't run migrations , code referring fields/tables etc in migration.
there must way change deployment process run rake db:migrate
automatically part of deploy process can't work out.
is set in heroku cpanel? option pass heroku command line? git hook? can set me straight? thanks, max
here rake task wraps one-liner (and supports rollback):
https://gist.github.com/362873
you still might wind deploying on top of boss's demo, @ least don't waste time typing between git push
, rake db:migrate
.
Comments
Post a Comment