Upgrade database version with blueprint

I’m wondering if there’s a smooth way to upgrade my database version 13 → 14 that is connected to a blueprint. I saw the steps listed in PostgreSQL | Render · Cloud Hosting for Developers, and it’s helpful, but doesn’t address blueprint environments specifically. My current plan is:

  1. Make an update to the render.yaml, and deploy that to a review environment to test out the database update
  2. Merge that in (the database will need a different name, and that will create a new database and leave the old one sitting around, disconnected)
  3. Dump the old and refresh the new

Does that sound right? If I were to not change the name, but specify a different version, what would happen to the database? I don’t have any issues with the restore (I’ve dry-run it, locally), so I’m not concerned about that part - just the management and connection of the services.

Hey Alex,

This definitely sounds like it would work. Even if you remove the old database from your render.yaml we wouldn’t actually delete the database (that’s a manual operation you would have to perform). Name has to be unique so if you only changed the version number it would fail.

I’d consider performing these steps to reduce risk:

  1. Add a new database to your render.yaml with the new version/name specified, deploy this so that resource is created.
  2. Restore the data from your old database into the new one
  3. Update render.yaml to point services to the new DB, remove old DB entry and deploy
  4. Ensure all is good.
  5. Delete/Suspend old database.

I’ve just followed these steps on my own DB and it has worked as expected,

John B

1 Like