Heroku - how to delete a table and start the migration again?

I just discovered that one of my tables in the Heroku application has a different structure than the one on my local host.

In the best case, I will need to start the migration, which will again create a new table, but what is the best way to do this?

Just manually delete the table on the Heroku terminal, and then change the migration date and run it again.

+4
source share
1 answer

you can redo one migration file as follows:

heroku run rake db:migrate:redo VERSION=20130311054546 

where 20130311054546 is the label of your migration.

To perform various database modifications such as drop table , etc., I usually use the David Dollar heroku SQL server console

+1
source

All Articles