FlowKit
FlowKit copied to clipboard
Upgrades and migrations
A topic we've generally evaded by having a very fixed schema is upgrades and migrations. There are a few parts to this -
- Postgres minor version update (solved because you just need to spin up a new container)
- Postgres major version update (need to run pg_upgrade, or otherwise copy-across)
- Schema change
- Data migration on schema changes
The latter three are related, but not identical. A related issue is that the current setup process halts when data already exists, so even additive changes to an existing deploy won't get made.
I think the likely best solution to 3 & 4 is that one needs an additional container which runs something like alembic or flyway to manage updating (and probably handles the initial schema setup as well), and for major Postgres updates.. I'm honestly not sure.