Skip to main content

schema-drift

Database schema drift detector that compares live schema against migration history and raises CI alerts

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
Statusstable
LicenseMIT
Last commit2 weeks ago
Versionv2.3.0
Buildpassing
stars612
forks74
contributors9
Back to Projects