How do I migrate my heroku database?
If you had a working database, you could recreate your tables from the schema:
heroku run rake db:schema:load
If you want to just reset the database to empty:
heroku run rake db:create
What is the error it is giving you? It might be more helpful to try to solve that problem rather than wipe everything.
This should be updated as heroku rake
has been deprecated. Use heroku run rake
now. See below, per command-line/stderr output, as of today (March 8, 2013):
Incorrect:
- PROMPT>
heroku rake db:migrate --app myApp
WARNING: 'heroku rake'` has been deprecated. Please use 'heroku run rake' instead.
Correct:
- PROMPT>
heroku run rake db:migrate --app myApp
Running
rake db:migrate
attached to terminal... up, run.2810