codd icon indicating copy to clipboard operation
codd copied to clipboard

Tooling to facilitate postgres upgrades

Open mzabani opened this issue 11 months ago • 0 comments

If one updates postgres, they currently need to coordinate a PR to upgrade the expected schema.

It will be simpler if we put one folder per major PG version in the expected-schema folder, and at runtime decide which to use.

Users would still need to ensure they update both if they keep multiple versions of postgres in different environments, but that seems inevitable.

However, for an upgrade in all environments, this will make the requirement of coordination simpler, allowing a PR that includes the expected schema of the new version to be merged a bit earlier.

It will also allow downgrading the DB more easily if something goes wrong.

This is quite similar to what @TravisCardwell did in https://www.extrema.is/blog/2023/03/28/codd-experiment-2-postgresql-upgrade, IIUC, but would be builtin to codd.

mzabani avatar Mar 15 '24 01:03 mzabani