Open Source: Postgres Migration Diff Tool
Python CLI that diffs PostgreSQL schemas across environments and outputs idempotent migration SQL. MIT-licensed.
About this project.
An MIT-licensed Python CLI that diffs PostgreSQL schemas across environments and outputs idempotent migration SQL — ~3k GitHub stars, used in production by 40+ teams.
Tech Stack
- Rust Core
- PostgreSQL Target DB
- CLI (clap) Interface
- GitHub Actions CI
Project Info
Key Features
Schema diff engine
Detects column, index, and constraint drift across partitioned + inherited tables, emits idempotent SQL.
CLI ergonomics
Dry-run mode with colored diff output, pipeable JSON for CI integration, single static binary.
Safety net
Schema snapshot diffing in test runners, refuses destructive ops without explicit flag, per-env policy.
Open source
MIT-licensed with ~3k GitHub stars, used in production by 40+ teams, monthly release cadence.
Fast on big schemas
Streams catalog queries to keep memory bounded; diffs a 4k-table schema in under a second locally.
Docs + recipes
Project recipes for the most common migration shapes plus a contributor guide for new resolvers.
Feature set
Schema diff engine
- Detects column, index, and constraint drift
- Handles partitioned + inherited tables
- Outputs idempotent migration SQL
CLI ergonomics
- Dry-run mode with colored diff output
- Pipeable JSON for CI integration
- Single static binary, no Postgres client required
Safety net
- Schema snapshot diffing in test runners
- Refuses destructive ops without explicit flag
- Per-environment policy file support
Open source
- MIT-licensed, ~3k GitHub stars
- Used by 40+ teams in production
- Contributor guide + monthly release cadence
You might also like.
Realtime SaaS Analytics Dashboard
Replaced a hand-rolled analytics pipeline with a streaming architecture. Query latency p95 dropped 40x. Shipped end-to-end from schema design to…
View project