23 ms·
> I'm considering creating my own migration library tailored to our actual needs and usage. It should not be so hard. Indeed. Go has like 5 options for SQL DDL
by never_inline 1y ago
> I'm considering creating my own migration library tailored to our actual needs and usage. It should not be so hard.
Indeed. Go has like 5 options for SQL DDL migrations now. On python side there's alembic and bunch of homegrown stuff in various frameworks.
I think much of the complexity in liquibase comes from supporting various databases.
One thing to remember: mark a new version before each step that can fail, even if the steps themselves are together in the same file.
This is a problem I ran too much into with alembic in which each file is a single unit - a statement in the middle of the script fails and there's no simple way to roll back (unless your DB supports transactional DDL). So the pattern I have settled is to have only one simple change in one file. Liquibase of course doesn't suffer this because it has unique IDs per statement.