Tuesday, February 26, 2013

Pushing to Heroku after Model Migration

Just some stuff to remember after after pushing a rails project to Heroku or some other PaaS when it contains a migration.
In the Terminal:
$ git push heroku
$ heroku pg:reset DATABASE
$ heroku run rake db:migrate
$ heroku run rake db:populate # if you have a db rake utility to fill your database with sample data

No comments:

Post a Comment