Destroying a Postgres DB on Heroku

前端 未结 4 752
Happy的楠姐
Happy的楠姐 2020-12-04 09:53

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

4条回答
  •  长情又很酷
    2020-12-04 10:26

    None of the answers above actually describe how to destroy a Heroku database, which was the original question (and what led me here seeking an answer).

    From their docs, either of these will work:

    • heroku addons:destroy heroku-postgresql:tier (where tier is the database tier, like hobby-dev)
    • heroku addons:destroy HEROKU_POSTGRESQL_ (if you have more than one database of that tier)

    Note that because this is a destructive action it will prompt you to confirm the action. If you want to use this in a script you can skip the prompt with something like this:

    heroku addons:destroy HEROKU_POSTGRESQL_ --confirm 
    

    Hope that's helpful!

提交回复
热议问题