How do I make sure my Heroku Postgres database credentials are correct?

Issue

You've accidentally changed your database credentials with heroku rollback or by directly editing a config var. You need to ensure your config vars have correct values that will get updated automatically in the future.

Resolution

You can reset your credentials with the heroku pg:credentials --reset command. That will create a new username and password for your database and update the associated config variable. If you have manually changed other config vars on this or another app, you can use the heroku addons:attach command to attach your database addon to the same app, or to another Heroku app.