finds.dev← search

// the find

djrobstep/migra

★ 3,049 · Python · Unlicense · updated Aug 2025

DEPRECATED: Like diff but for PostgreSQL schemas

migra was a CLI tool that diffed two live Postgres databases and generated the ALTER statements to migrate one schema to the other. It's officially deprecated — last release was 2022 — with the author pointing to a successor project called 'results'. Worth knowing about if you've inherited a codebase that uses it, but you shouldn't start new projects on it.

The core idea was genuinely useful: connect to two databases, get back executable SQL to reconcile them. It handled tricky dependency ordering (enums before tables, constraints after columns), which is the part that's actually hard to get right. The fixture-based test suite is thorough — separate SQL files for schema A, schema B, and expected output, covering partitioning, RLS, triggers, identity columns, and table inheritance. That's a lot of Postgres surface area covered.

It's deprecated and unmaintained — the README says so in the first line, and the last real release was September 2022. The successor 'results' is unproven and has a fraction of the stars. It requires two live Postgres connections to do a diff, which rules out schema-only workflows (comparing migration files, CI without a DB). Python dependency chain means you're pulling in schemainspect and psycopg2, both of which have their own compatibility headaches with newer Postgres versions.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →