3 ms·
Looks like a solid basic implementation, along the same lines as Django migrations or Alembic in the Python world. I always find these tools a bit lacking thou
by danpalmer 6y ago
Looks like a solid basic implementation, along the same lines as Django migrations or Alembic in the Python world.
I always find these tools a bit lacking though. Over the long term, things that I find mattering are:
- Correctness of changes being made
- Support in getting to Zero-downtime migrations
- Support in CI around testing against the right schemas
- Squashing changes/garbage collecting after a given point
- Support for applying the same change to multiple production environments (where you can't rollback one because another failed).
These are all hard problems! Some are quite specific to certain kinds of application too. But companies always seem to end up building custom tooling for this sort of stuff. I'm sure there's a place for a tool that gets the right balance between support for these complex use-cases and defining a way of working.
- djrobstep 6y agoUsing a schema diff tool can help with a number of the problems you mention - you can test correctness, autogenerate changes, and because you can diff from current -> target without version numbers, no need to keep a chain of migration files hanging around.
- danpalmer 6y agoThat's true, it would solve some of these problems. I do think the ultimate solution needs an awareness of both the diff and the migration plan though, to be able to test for things like whether changes can be made without downtime in a particular order. Unfortunately I suspect that the tool _also_ needs runtime instrumentation of the database in some cases to understand behaviour enough to address all of these concerns.