A dependency-free, **runnable** toolkit for changing database schemas the safe way: versioned up/down migrations, a tiny SQL runner you can actually read, and the expand/contract patterns that let you
Browse the actual product documentation and code examples included in this toolkit.
Key features of Database Migration Toolkit
• `runner/migrate.py` — a ~480-line, stdlib-only migration runner: ordered • Drives 3 engines through one thin seam: SQLite with zero setup (default), plus • A proven expand/contract example — four bundled migrations that split a `full_name` • Production PostgreSQL DDL — the same change with `CREATE INDEX CONCURRENTLY`-class • A reusable batched-backfill template (PostgreSQL + MySQL) using keyset pagination. • Six field guides covering versioning, zero-downtime expand/contract, online schema
`runner/migrate.py` — a ~480-line, stdlib-only migration runner: ordered
Drives 3 engines through one thin seam: SQLite with zero setup (default), plus
A proven expand/contract example — four bundled migrations that split a `full_name`
Production PostgreSQL DDL — the same change with `CREATE INDEX CONCURRENTLY`-class
A reusable batched-backfill template (PostgreSQL + MySQL) using keyset pagination.
Six field guides covering versioning, zero-downtime expand/contract, online schema
Configure Database Migration Toolkit parameters to see how the product works.
# 1. See what's pending (nothing applied yet) python3 runner/migrate.py status # 2. Apply all four migrations to a throwaway SQLite database python3 runner/migrate.py up # 3. Confirm and check for drift python3 runner/migrate.py status python3 runner/migrate.py validate