Code Monkey home page Code Monkey logo

Comments (4)

keiko713 avatar keiko713 commented on September 26, 2024

Or, at least have a better doc: https://devcenter.heroku.com/articles/fork-app

from heroku-fork.

jdx avatar jdx commented on September 26, 2024

#18

from heroku-fork.

benbuckman avatar benbuckman commented on September 26, 2024

This is contrary to my expectation: --skip-pg should not create a new database, but if DATABASE_URL points to an existing database, shouldn't it keep the config value?

Per https://devcenter.heroku.com/articles/fork-app (as noted above),

If the DATABASE_URL value was manually set on sourceapp, for instance to share a database with another app or to add a parameter like ?pool=10, its value will be copied to targetapp verbatim. In other words, targetapp will be configured to use the same database as sourceapp.

This change seems to contradict that documentation.

What is the correct way now to maintain DATABASE_URL on a forked app – set it manually with heroku config after the app is created?

from heroku-fork.

keiko713 avatar keiko713 commented on September 26, 2024

Sorry for the super late reply and thanks for reporting this. That Dev Center article is somewhat incorrect actually, first of all you can't modify DATABASE_URL config var manually anymore. Seems like that part was documented for years ago when we still didn't have that restriction and hasn't been updated. I'll work on to update the doc.

You could still share one database with multiple apps by attaching, but if you attach in this way, you really shouldn't just copy the config variable to the forking app. It'll loose the information of "attaching", and whenever we need to update the DATABASE_URL (e.g. there is an issue with underlying instance and have to move the database to the different host) as it won't be updated automatically.

If you would like to share the one database between the original app and forked app, you should be attaching the addon after the fork.

from heroku-fork.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.