Overview
schema-drift compares your live database schema against the expected state derived from your migration history. When they diverge — due to manual changes, failed rollbacks, or environment inconsistencies — it fails the CI pipeline and reports exactly what changed.
Quick Start
npx schema-drift check \
--db postgres://user:pass@localhost/mydb \
--migrations ./migrations
Features
- Supports PostgreSQL, MySQL, and SQLite
- Detects added, removed, and modified columns, indexes, and constraints
- GitHub Actions and GitLab CI integration
- JSON and Markdown diff reports
- Configurable ignore patterns for non-critical drift