I want to change the billing app for my Heroku Postgres database.
Unfortunately, there currently isn't a way to change the billing app of add-ons to another app.
As a workaround, you can create a new database with a copy of the data and attach it to the app you want to set as the new billing app.
To do this, you can follow these steps:
- Create the new database with a copy of the data from the database on the current billing app and attach it to the other app (desired billing app)
$ heroku addons:create heroku-postgresql:<plan> --fork <current-billing-app-name>::DATABASE_URL --app <other-app>
heroku pg:wait. Wait for this to say that the new database is ready.
Promote the new database using
heroku pg:promote -a other-app
If the above commands work successfully, you'll then have a working copy of all the data on an add-on that is billed to the desired app.