zlacker

[return to "Sqldef: Idempotent schema management tool for MySQL, PostgreSQL, SQLite"]
1. dewey+sCc[view] [source] 2026-02-05 00:02:49
>>Palmik+(OP)
I'm always in the market for new sql tooling, but I'm wondering what's the use case there?

Isn't it much quicker to write a one line migration vs copying the DDL, then adapting it to the desired state and then getting getting the migrations from that tool? Or am I misunderstanding something?

◧◩
2. evanel+ODc[view] [source] 2026-02-05 00:11:47
>>dewey+sCc
Be sure to look at the actual sqldef command-line tool, not the trivial copy-and-paste demo on their website. Declarative schema management is best used combined with a Git repo.

In the big picture, declarative schema management has lots of advantages around avoiding/solving schema drift, either between environments (staging vs prod) or between shards in a sharded setup (among thousands of shards, one had a master failure at an inopportune time).

It's also much more readable to have the "end state" in your repo at all times, rather than a sequence of ALTERs.

There are a bunch of other advantages; I have an old post about this topic here: https://www.skeema.io/blog/2019/01/18/declarative/

It's also quite essential when maintaining nontrivial stored procedures. Doing that with imperative migrations is a gateway to hell. https://www.skeema.io/blog/2023/10/24/stored-proc-deployment...

◧◩◪
3. montro+5Gc[view] [source] 2026-02-05 00:28:34
>>evanel+ODc
Yes, we've used skeema for this for many years, and it is just plain lovely. Putting into source control your desired end state is so much more intuitive and understandable than accumulating migrations. In a way it's like the difference between jQuery and React -- you just say how you want it to look like in the end, and the computer does the work to figure out how to make it so.
◧◩◪◨
4. evanel+Xmd[view] [source] 2026-02-05 07:06:58
>>montro+5Gc
Thank you for the kind words about Skeema!
◧◩◪◨⬒
5. xeonax+7Bd[view] [source] 2026-02-05 09:09:44
>>evanel+Xmd
Its named as if a khajit had DB tools to sell
◧◩◪◨⬒⬓
6. evanel+wme[view] [source] 2026-02-05 15:07:48
>>xeonax+7Bd
Not sure what that means, but it's named partially as a nod to Skee-Ball. The town I grew up in was actually the home of the factory where all Skee-Ball machines were made.

I was using a location-related naming scheme in general at that time; similarly my automation library was called Go La Tengo because I was living in the town where the band Yo La Tengo was from.

[go to top]