I used the fly postgres import command to import my database from Heroku.
The resulting database has some name that is autogenerated by heroku. This doesn’t work with my attached fly app as it expects the database to be named like the app.
To rename the imported database I need first to drop (or rename) the existing app-database. This always fails with an error “There is 1 other session using the database.”.
My app is suspended at this time.
What can I do, to rename the database or otherwise get a database with the “right” name after importing from heroku?
Thanks for the hint. It’s just a bit ugly to keep the auto-generated names from heroku, like the fly naming convention better.
I have done nothing specific with attach etc. Just launched and deployed my existing django app with an autogenerated Fly Postgres app.
Then followed the tutorial to import the database from heroku.
If someone from fly.io is reading: perhaps the import from heroku tutorial should mention this problem. I lost some time because my app database was empty after importing, until I found out there is anoter database with the name from heroku.