zlacker

[return to "Sqldef: Idempotent schema management tool for MySQL, PostgreSQL, SQLite"]
1. wener+nSc[view] [source] 2026-02-05 02:08:40
>>Palmik+(OP)
I use https://github.com/ariga/atlas for this, migration based and schema base both has there good and bad side, I prefer both even in one project, schema based can make dev faster, eaiser, migration based make feel reliable.
◧◩
2. a8m+E0d[view] [source] 2026-02-05 03:22:10
>>wener+nSc
Ariel from Atlas here. This setup is pretty common (declarative locally, versioned in real environments). Since migrations are auto-generated (by Atlas) on PRs, most developers never touch the versioned workflow directly.

See: https://atlasgo.io/concepts/declarative-vs-versioned#combini..., and https://github.com/ariga/atlas-action?tab=readme-ov-file#ari...

◧◩◪
3. gwking+Ead[view] [source] 2026-02-05 05:03:43
>>a8m+E0d
I wrote a very rudimentary schema and automatic migration system for SQLite. One problem that I ran into recently was deploying changes that spanned two migrations, because the tool doesn’t know how to step through commits to do successive auto-migrations between schema versions. I guess there are rather obvious ways to handle this if you generate and then commit the full migration sql for each schema change. Nonetheless I’m curious if this is a problem you have had to think about, if you find it interesting or if it sounds like a bad path to go down, and if atlas does anything smart in this department. Thanks in advance!
[go to top]