See the lock a Postgres migration takes before you merge it.
Migration Guard is a planned GitHub check. On a pull request that changes SQL migrations, it will post one comment per PR: which statements take which Postgres lock, what that lock blocks, and a lower-risk rewrite where one exists. It will link the PostgreSQL documentation for each lock.
Status: Early access. Not built yet: the GitHub Action is not started; we will build it if early-access demand is there.
Who it is for
Backend engineers and tech leads who review Postgres migration .sql files in GitHub pull requests.
How it will work
- Add the GitHub Action to your repo.
- Open a PR that touches migration
.sqlfiles. - Read one comment listing each statement's lock, what it blocks, and a lower-risk rewrite.
See an example
Hand-written illustrations of the report format (the Action is not built yet):
What it will not do
It will never say a migration is "safe". It uses a fixed rule list; statements it does not recognise are marked for review. It will not know your table sizes in the first version.
Price
$19 per repo per month early-access price. This is a planned price, not yet charged. Nothing is charged when you join early access.
Free alternative
Squawk is a free open-source linter for Postgres migrations (github.com/sbdchd/squawk). We are testing whether plain-language lock explanations and rewrites are worth paying for. Squawk is a separate project and is not affiliated with us.
Join early access
We store your email, a source tag, your consent and the signup time in Cloudflare D1, to email you about Migration Guard. Privacy