DevOps & Cloud · Migration safety checker
SchemaGate
Migrations that never lock production.
Every database migration in every pull request, checked for table locks and breaking changes, with the safe way to write it. SQL, Alembic, Django and Rails.
$ migration-guard check db/ --sizes sizes.json
17 risk(s) in 4 of 7 migration file(s)
HIGH MG001 Index built without CONCURRENTLY on orders (48,000,000 rows)
CREATE INDEX orders_customer_idx ON orders (customer_id)
Blocks: writes for the whole build
HIGH MG002 NOT NULL column added without a default on invoices
add_column :invoices, :status, :string, null: false
The problem
Most migration outages come from statements that look harmless: an index built without CONCURRENTLY, a NOT NULL added in one step, a column dropped while the old version is still running. Reviewers rarely know which lock each statement takes.
What it does
17 rules for PostgreSQL and MySQL: index builds, NOT NULL changes, volatile defaults, type changes, foreign keys and checks without NOT VALID, drops and renames, missing lock_timeout, unbatched backfills
Reads raw SQL and Alembic, Django and Rails migrations, and shows the developer's own line of code
Says what each statement blocks (writes, everything, or the running app version) and the safe rewrite
Table-size aware: locks on small tables are marked low risk, giant tables get the attention
Checks only the migrations changed in a pull request, with a comment on the PR and a CI gate
SARIF output for GitHub code scanning; JSON and Markdown too
Recognises no-transaction markers for Flyway, goose and dbmate, and per-line ignores with a reason
How it works
- Add the GitHub Action or run the CLI on your migrations folder
- Optionally add table row counts for size-aware risk
- Fix or consciously accept each flagged statement before merge
Works with
Runs in your CI
- uses: actions/checkout@v5
with: {fetch-depth: 0}
- uses: Deepanshu18Saini/migration-guard@main
with: {fail-on: high}
Your data
- Reads migration files only; never connects to your database.
- Row counts, if you give them, stay on your machine.
- Runs in your own CI.
Who it's for
Questions
How is it different from Squawk or strong_migrations?
Those are excellent for one framework. SchemaGate checks raw SQL, Alembic, Django and Rails in one place, weighs risk by table size, and explains each lock in plain language for reviewers.
Will it block every migration?
No. New tables, safe patterns and small tables pass; you choose the failure threshold, and accepted risks can be ignored per line with a reason.
Related
Often used with SchemaGate
BlastRadar
Change impact analysisKnow what a change will touch. Before a release, see every service a change can affect and the line of code that links it. After the release, confirm those services are still healthy.
$300–600 (₹10,000–20,000 in India)View product → DevOps & CloudSLOStudio
SLOs and error budgetsReliability you can measure. Define each SLO in a few lines and get correct burn-rate alerts, an error budget everyone understands, and a release gate, on the monitoring you already run.
$1,500–3,000 (₹40,000–80,000 in India)View product → DevOps & CloudTestScope
Test impact selectionRun the tests that matter. Every pull request runs the tests its change can affect, each with a stated reason, and the full suite whenever a change is too broad to trust.
$1,000–2,500 (₹25,000–60,000 in India)View product →See SchemaGate on your own data
A 30-minute call. We run the product on your export, repository or document and walk you through the results.