-
Notifications
You must be signed in to change notification settings - Fork 86
heroku fork doesn't recognize a primary database properly #19
Comments
I have the exact same problem and https://devcenter.heroku.com/changelog-items/438 suggests that changing an add-on should work, but you can't run |
@ccmcbeck sorry to hear that you hit this issue. In your case, please run |
Interesting. That does create DATABASE_URL, but it also removes HEROKU_POSTGRESQL_. I guess that is by design. From: Keiko Oda [email protected] @ccmcbeckhttps://github.com/ccmcbeck sorry to hear that you hit this issue. In your case, please run heroku pg:promote HEROKU_POSTGRESQL_. This will make database to be DATABASE_URL. — This email has been scanned by the Symantec Email Security.cloud service. This email has been scanned by the Symantec Email Security.cloud service. |
Just picked up another one as well. It looks like this:
End result is a forked app with a new database but DATABASE_URL pointing to the original DB. |
When you have a database that is a primary but under the certain circumstances,
heroku fork
will create a new database within a new app, and do not make it as a primary database within the new app, which will end up copying the old app'sDATABASE_URL
to the new app. Now your forked app will be pointing to the original app's database, which can cause a nightmare.Here is roughly what happens:
DATABASE_URL
config var with a new app, we copy the old app'sDATABASE_URL
to the new appThe reason of the old app's AMBER is not recognized as
DATABASE_URL
is a long story but it can certainly happen. One workaround that I can think of is to promote such database after the creation manually so that the new app will have a properDATABASE_URL
.I don't think I'm explaining the issue well enough here, please ping me if you have nay questions. Also I'm happy to discuss about potential fixes.
The text was updated successfully, but these errors were encountered: