Simple question but my googling has completely failed me.
How do you change the password for the postgres database for a Heroku Rails application?
heroku pg:credentials DATABASE --reset
ought to do it
Source: https://devcenter.heroku.com/articles/heroku-postgresql
This used to not be possible, but now with the new Heroku Postgres plans you can now 'rotate' your database credentials.
You can do this via heroku pg:credentials HEROKU_POSTGRESQL_GRAY_URL --reset
where the HEROKU_POSTGRESQL_GRAY_URL is the correct name based on your heroku config
output.
On old plans, where this may be unsupported, you may be able to get heroku support to do it if you logged a ticket although they'll probably want a valid reason.
pg:credentials --reset
is deprecated. Please use pg:credentials:rotate
instead
heroku pg:credentials:rotate DATABASE -a sushi
Source: https://devcenter.heroku.com/articles/heroku-postgresql-credentials
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With