Skip to content

SQLTy vs MigrationPilot

Both warn about PostgreSQL migrations that lock or rewrite tables in production. MigrationPilot is a dedicated migration linter that explains what each statement does to production. SQLTy's migration rules are part of sqlty breaking: they read new statements against the existing schema and check the Python code that queries the same tables. This page runs SQLTy on MigrationPilot's own benchmark.

Quick comparison

MigrationPilot 1.6 SQLTy 0.10
Benchmark hazards caught, strict (33) 31 28; 33 with query-aware breaking for drops and renames
False positives (17 safe cases) 1 0
Knows the existing schema No: each file on its own Yes: the baseline revision
Drops and renames Flags each one Flags one only when a query still reads the object
Table sizes Not known Not known: flags a small-table backfill too
Distribution npm PyPI, npm (@sqlty/cli)
Python code Not read Queries checked against the old and new schema

The numbers come from the benchmark corpus at 157bcc5, with MigrationPilot 1.6.1's score from the benchmark's own table. SQLTy 0.10.0 ran on the same files.

Where SQLTy is stronger

  • No false positives on the safe files, because it knows which tables already exist and which type changes are metadata only.
  • Drops and renames judged by usage. Dropping a column nothing reads is safe, and SQLTy is the only tool in the benchmark that treats it that way.
  • The code side of a deploy: queries are checked in both directions.

Where MigrationPilot is stronger

  • More hazards caught on its own corpus without code context.
  • It is focused on migrations, with explanations of the lock each statement takes.

Which should you choose?

Choose MigrationPilot when you review migration files on their own, without the application code.

Choose SQLTy when the migrations and the Python code share a repository, and you want the lint step to know both.

What SQLTy is missing

  • Table size awareness, which neither tool has: unbatched-backfill fires on small tables too.
  • Explanations of the lock each statement takes, beyond each rule's page.

Common questions

Does SQLTy need a database to check migrations?

No. It replays the migrations at the baseline revision and at your working tree.

Sources

  • MigrationPilot bench/corpus at 157bcc5 (MIT), 56 labelled files, scored with the benchmark's own rule map
  • npm migrationpilot 1.6.4 (2026-11-29)