1

We're busy transitioning an old Heroku app from the bamboo stack to the cedar stack. We're trying to minimize downtime and therefore are trying to avoid a maintenance down time. The data is time sensitive and financial in nature so we can't afford to lose any transactions.

With this in mind I've been investigating sharing a database between these two applications as mentioned here: https://stackoverflow.com/a/5981700/361417.

What I'm worried about is how Heroku decides to terminate and remove unused databases from their system.

tl;dr
If I set up a new application to use the same database as an old application and then later terminate the old application, will Heroku still recognise that the database is in use (by the new application)?

Community
  • 1
  • 1
Robert Fall
  • 861
  • 10
  • 22

1 Answers1

0

After speaking to Heroku Support it turns out that the database is tied to the application and will not automatically detect that it is in use, but will be terminated when you delete the old applicaiton:

Hi Robert, if you delete the old application the database will be deleted. The database add-on is still attached to the app, the environment variable is just a configuration pointer. I'd suggest just scaling the old application down to 0 so it isn't running, and leave it there to hold the database you are using.

Personally I'd recommend against scaling an application down to 0. Rather pay the upfront cost of moving your data over to your new application and be sure that the data is safe than run the risk of someone accidentally deleting the old application.

Robert Fall
  • 861
  • 10
  • 22