Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Destroying a Postgres DB on Heroku

I want to destroy the database but I'm not sure what the command would be. Does anyone know how to do this?

like image 460
captDaylight Avatar asked Oct 01 '11 20:10

captDaylight


People also ask

How do I delete data from Heroku database?

Your organization can use the “heroku addons:destroy” command to initiate deletion of a primary, forked or follower Heroku Postgres database.

How do I rollback a Heroku database?

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. This was the missing step, there was no migration to rollback to seeing that I rollback the code already, thanks!

Is Heroku Postgres good?

Heroku Postgres offers a number of different plans, each of which provides the highest security standards. Ultimately, Heroku Postgres is a great option for any developer looking to build, scale, or maintain their databases without having to take infrastructure into consideration.


1 Answers

You shouldn't use a postgres command to fully delete your database, as you will not have permissions to create a new one. Instead you should use the heroku command to clear out your database:

heroku pg:reset DATABASE_URL 
like image 55
CraigKerstiens Avatar answered Oct 26 '22 12:10

CraigKerstiens