Q:

How to rollback database migration on Heroku

I just deployed some code and database changes to Heroku and I would like to roll it back. I do have the releases add-on and was able to roll back the code but not the database. I didn't backup the database so I can't do a restore. I tried "heroku rake db:rollback" but it didn't do anything. Anyone knows?

A:

You have to run heroku rake db:rollback while the updated code that has the .down migration is deployed to Heroku. After that, you can rollback the code.

