In a Rails application you can you this tasks on localhost to reset the database.
rake db:drop rake db:create rake db:migrate
And that will delete the db schema, create a new one and run all migrations to create the tables. This is awesome!
But if try to run this on heroku:
heroku run rake db:drop
Than you will get an exception, because you don’t have permission to delete dbs on Heroku. If you want to reset your database on Heroku you have to use this command:
heroku pg:reset DATABASE_URL
this is equal to “rake db:drop” and “rake db:create”. After that you still have to run:
heroku run rake db:migrate
That worked pretty good for me.
Just wanted to share my experience.