frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Sqldef: Idempotent schema management tool for MySQL, PostgreSQL, SQLite

https://sqldef.github.io/
50•Palmik•3d ago

Comments

davidkwast•2h ago
Wow. I saved the link for emergencies. And I sent it to all my team. It is like a diff tool but to advance the schema.
evanelias•1h ago
Personally I've always called this style "declarative schema management" since the input declares the desired state, and the tool figures out how to transition the database to that state.

sqldef is really cool for supporting many database dialects. I'm the author of Skeema [1] which includes a lot of functionality that sqldef lacks, but at the cost of being 100% MySQL/MariaDB-specific. Some other DB-specific options in this space include Stripe's pg-schema-diff [2], results [3], stb-tester's migrator for sqlite [4], among many others over the years.

The more comprehensive solutions from ByteBase, Atlas, Liquibase, etc tend to support multiple databases and multiple paradigms.

And then over in Typescript ORM world, the migrators in Prisma and Drizzle support a "db push" declarative concept. (fwiw, I originated that paradigm; Prisma directly copied several aspects of `skeema push`, and then Drizzle copied Prisma. But ironically, if I ever complete my early-stage next-gen tool, it uses a different deployment paradigm.)

[1] https://github.com/skeema/skeema/

[2] https://github.com/stripe/pg-schema-diff

[3] https://github.com/djrobstep/results

[4] https://david.rothlis.net/declarative-schema-migration-for-s...

tln•58m ago
I like how Drizzle provides several options for the migrations.

1. DB is source of truth, generate TS from DB 2. TS to DB direct sync, no migration files 3. TS source, Drizzle generates and applies SQL 4. TS source, Drizzle generates SQL, runtime application 5. TS source, Drizzle generates SQL, manual application 6. TS source, Drizzle outputs SQL, Atlas application

dewey•1h ago
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?

evanelias•1h ago
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...

montroser•1h ago
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.
Pxtl•1h ago
MS' Sql Server Data Tools is such an abominable garbage fire that I have no interest in these kind of tools. Besides being a buggy mess, it's very often insufficient - you end up having to maintain migrations anyways because often you have to inject data into new tables or columns, or rename columns, etc.
edoceo•56m ago
Anyone with real-world usage of this one vs atlas. I've used atlas but it seems to be moving away from FOSS (paywalled-fearures). Its also struggled with some migrations that were a bit more than not trivial (like trying to play changes in the wrong order)
nodesocket•23m ago
Looks pretty cool. Lately I've been using ChatGPT to generate SQLite schema migrations and it works shockingly well. I give it the original schema and new schema and it generates the statements including caveats and gotchas to watch out for.

OpenClaw Is What Apple Intelligence Should Have Been

https://www.jakequist.com/thoughts/openclaw-is-what-apple-intelligence-should-have-been
60•jakequist•1h ago•42 comments

Voxtral Transcribe 2

https://mistral.ai/news/voxtral-transcribe-2
720•meetpateltech•10h ago•174 comments

As Rocks May Think

https://evjang.com/2026/02/04/rocks.html
51•modeless•2h ago•35 comments

Claude Code: connect to a local model when your quota runs out

https://boxc.net/blog/2026/claude-code-connecting-to-local-models-when-your-quota-runs-out/
182•fugu2•3d ago•88 comments

Sqldef: Idempotent schema management tool for MySQL, PostgreSQL, SQLite

https://sqldef.github.io/
50•Palmik•3d ago•9 comments

AI is killing B2B SaaS

https://nmn.gl/blog/ai-killing-b2b-saas
217•namanyayg•8h ago•372 comments

Remarkable Pro Colors

https://www.thregr.org/wavexx/rnd/20260201-remarkable_pro_colors/
60•ffaser5gxlsll•3d ago•21 comments

Claude Code for Infrastructure

https://www.fluid.sh/
138•aspectrr•7h ago•122 comments

Building a 24-bit arcade CRT display adapter from scratch

https://www.scd31.com/posts/building-an-arcade-display-adapter
122•evakhoury•8h ago•33 comments

Microsoft's Copilot chatbot is running into problems

https://www.wsj.com/tech/ai/microsofts-pivotal-ai-product-is-running-into-big-problems-ce235b28
118•fortran77•9h ago•148 comments

Tractor

https://incoherency.co.uk/blog/stories/tractor.html
144•surprisetalk•1d ago•48 comments

A real-world benchmark for AI code review

https://www.qodo.ai/blog/how-we-built-a-real-world-benchmark-for-ai-code-review/
36•benocodes•4h ago•14 comments

Attention at Constant Cost per Token via Symmetry-Aware Taylor Approximation

https://arxiv.org/abs/2602.00294
150•fheinsen•11h ago•81 comments

A sane but bull case on Clawdbot / OpenClaw

https://brandon.wang/2026/clawdbot
248•brdd•1d ago•390 comments

Spotlighting the World Factbook as We Bid a Fond Farewell

https://www.cia.gov/stories/story/spotlighting-the-world-factbook-as-we-bid-a-fond-farewell/
87•mxfh•4h ago•72 comments

RS-SDK: Drive RuneScape with Claude Code

https://github.com/MaxBittker/rs-sdk
95•evakhoury•8h ago•39 comments

Data Poems

https://dr.eamer.dev/datavis/poems/
20•putzdown•3d ago•4 comments

Claude is a space to think

https://www.anthropic.com/news/claude-is-a-space-to-think
364•meetpateltech•13h ago•192 comments

Show HN: Morph – Videos of AI testing your PR, embedded in GitHub

https://morphllm.com/products/glance
18•bhaktatejas922•4h ago•8 comments

Lily Programming Language

https://lily-lang.org
5•FascinatedBox•3d ago•1 comments

Converge (YC S23) Is Hiring Product Engineers (NYC, In-Person)

https://www.runconverge.com/careers/product-engineer
1•thomashlvt•8h ago

Coding Agent VMs on NixOS with Microvm.nix

https://michael.stapelberg.ch/posts/2026-02-01-coding-agent-microvm-nix/
82•secure•3d ago•39 comments

Arcan-A12: Weaving a Different Web

https://www.divergent-desktop.org/blog/2026/01/26/a12web/
49•ingenieroariel•9h ago•14 comments

Sam Altman responds to Anthropic's "Ads are coming to AI. But not to Claude" ads

https://xcancel.com/sama/status/2019139174339928189
15•PieUser•54m ago•8 comments

The Codex app illustrates the shift left of IDEs and coding GUIs

https://www.benshoemaker.us/writing/codex-app-launch/
61•straydusk•5h ago•130 comments

Debian's Challenge When Its Developers Drift Away

https://www.phoronix.com/news/Debian-Developers-Quiet-Away
35•cuechan•3h ago•0 comments

Tell HN: Another round of Zendesk email spam

75•Philpax•6h ago•29 comments

Show HN: Bunqueue – Job queue for Bun using SQLite instead of Redis

https://github.com/egeominotti/bunqueue
7•kernelvoid•2d ago•2 comments

Guinea worm on track to be 2nd eradicated human disease; only 10 cases in 2025

https://arstechnica.com/health/2026/02/guinea-worm-on-track-to-be-2nd-eradicated-human-disease-on...
260•bookofjoe•11h ago•113 comments

No More Hidden Changes: How MySQL 9.6 Transforms Foreign Key Management

https://blogs.oracle.com/mysql/no-more-hidden-changes-how-mysql-9-6-transforms-foreign-key-manage...
29•ksec•4d ago•15 comments