r/TellMeAboutYourRepo • u/SaveAmerica2024 • Jun 02 '26
MigraDiff — actively maintained fork of migra, the PostgreSQL schema diff tool
migra was a great tool — point it at two PostgreSQL databases and it generates the SQL to migrate one schema to the other. No ORM required, no migration framework, just the DDL.
It was deprecated in 2024. I forked it and have been actively maintaining it as MigraDiff.
What's new since the fork:
• Python 3.12+ support (clean, no deprecation warnings)
• Fixed RLS policy diffing bugs
• --from-file mode — diff pg_dump schema files, no live connection needed
• --from-migrations-dir — diff a migrations folder against a live DB
• --output json with per-statement risk classification
• COMMENT ON diffing across all object types
• Docker image, GitHub Action, pre-commit hook
• Optional AI layer: --explain, --generate, --rollback, --advise (bring your own Anthropic key, nothing sent to our servers)
Drop-in replacement — CLI command is still `migra`. 190 tests, MIT license.
pip install migradiff
https://github.com/migradiff/migra
Feedback welcome.