Duvaxa

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.

Product teams on PostgreSQL or MySQLPlatform and DBA leadsTeams that have had a migration outage
migration-guard · example
$ 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
Real run on the built-in sample migrations; the safely written version of the same change passes clean.
DatabasesPostgreSQL, MySQL
ReadsSQL, Alembic, Django, Rails
Runs onYour laptop, server or CI
OutputPR comment, SARIF, JSON

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

01

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

02

Reads raw SQL and Alembic, Django and Rails migrations, and shows the developer's own line of code

03

Says what each statement blocks (writes, everything, or the running app version) and the safe rewrite

04

Table-size aware: locks on small tables are marked low risk, giant tables get the attention

05

Checks only the migrations changed in a pull request, with a comment on the PR and a CI gate

06

SARIF output for GitHub code scanning; JSON and Markdown too

07

Recognises no-transaction markers for Flyway, goose and dbmate, and per-line ignores with a reason

How it works

  1. Add the GitHub Action or run the CLI on your migrations folder
  2. Optionally add table row counts for size-aware risk
  3. Fix or consciously accept each flagged statement before merge

Works with

PostgreSQLMySQLAlembicDjangoRailsFlywaygolang-migrateGitHub ActionsGitHub code scanning

Runs in your CI

GitHub Actions workflow step
- uses: actions/checkout@v5
with: {fetch-depth: 0}
- uses: Deepanshu18Saini/migration-guard@main
with: {fail-on: high}
Licensed customers get the action or command-line tool installed in their own organisation; it runs on your runners, so your code and plans never leave them. The command-line tools run in GitLab CI the same way.

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

Product teams on PostgreSQL or MySQLPlatform and DBA leadsTeams that have had a migration outage

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

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.

Book a demo