MigrationPilot vs FlywayLint Your Migrations Before Flyway Runs Them
Flyway is a migration runner — it tracks and applies schema changes. MigrationPilot is a migration linter — it catches dangerous DDL patterns before they reach production. They solve different problems and work best together.
Different Tools for Different Jobs
- --Tracks migration version history
- --Applies SQL files to a database
- --Manages schema versioning and rollback
- --Does not analyze SQL for safety
- --Does not check lock impact
- --Does not suggest safe alternatives
- 80 safety rules for PostgreSQL DDL
- Lock type analysis per statement
- Risk scoring (RED / YELLOW / GREEN)
- Auto-fix for 12 common issues
- Safe alternative suggestions
- Auto-detects Flyway migration directories
Feature Comparison
| Capability | Flyway | MigrationPilot |
|---|---|---|
| Primary purpose | Run migrations | Lint migrations |
| SQL safety analysis | No | 80 rules |
| Lock type detection | No | Per-statement (SHARE through ACCESS EXCLUSIVE) |
| Risk scoring | No | RED / YELLOW / GREEN (0-100) |
| Auto-fix | No | 12 rules auto-fixable |
| Safe alternative suggestions | No | Yes (with SQL examples) |
| Migration versioning | Yes | No (not needed) |
| Schema change execution | Yes | No (read-only analysis) |
| Rollback support | Undo (paid) | Rollback DDL generation |
| GitHub Action | Community | Official (PR comments, inline annotations) |
| VS Code extension | No | Yes |
| SARIF output | No | Yes (GitHub Code Scanning) |
| Config presets | No | 5 built-in presets |
| Framework detection | Flyway only | 14 frameworks (including Flyway) |
| PostgreSQL focus | Multi-database | PostgreSQL-specialized |
| License | Apache 2.0 (Community) / Commercial | MIT |
| Pricing | Free Community / $$$$ Teams/Enterprise | Free (77 rules) / $19/mo Pro |
What MigrationPilot Adds to Your Flyway Workflow
Catch Dangerous DDL Before Deployment
Flyway will happily run CREATE INDEX without CONCURRENTLY on a 100M-row table. MigrationPilot catches it in CI and suggests the safe alternative.
Lock Impact Visibility
Every DDL statement acquires a PostgreSQL lock. MigrationPilot tells you exactly which lock type each statement takes and whether it will block reads, writes, or both.
Auto-Fix Common Issues
MigrationPilot can automatically rewrite 12 common dangerous patterns: adding CONCURRENTLY, setting lock_timeout, using NOT VALID, and more.
Risk-Based PR Feedback
The GitHub Action posts a detailed safety report on every PR. RED/YELLOW/GREEN scoring gives reviewers immediate context on migration risk.
Works With Your Flyway Setup
MigrationPilot auto-detects Flyway migration directories (V*.sql, R*.sql). Point it at your db/migration folder and it works immediately.
Production Context (Pro)
Connect to your production database (read-only) to score risk based on actual table sizes, query frequency, and connection counts.
When to Use Each Tool
Use Flyway when you need to...
- Track which migrations have been applied
- Apply migrations to multiple environments
- Manage versioned SQL across your Java/JVM stack
- Execute schema changes against your database
- Support multiple database engines (MySQL, Oracle, SQL Server)
Use MigrationPilot when you need to...
- Review migration SQL for lock safety before merging
- Catch dangerous DDL patterns in CI/CD
- Get safe alternative SQL for risky operations
- Automatically fix common migration anti-patterns
- Enforce PostgreSQL migration best practices across your team
Best approach: Use both together
MigrationPilot is not a Flyway replacement — it is a complement. Keep Flyway for migration execution and versioning. Add MigrationPilot to your CI pipeline to lint migration files before Flyway applies them. This is like running ESLint on your JavaScript before deploying it.
Add MigrationPilot to Your Flyway Project
Lint locally
# Analyze your Flyway migrations npx migrationpilot analyze db/migration/ # Auto-detect Flyway directory npx migrationpilot detect
Add to GitHub Actions
# .github/workflows/migration-lint.yml
name: Lint Migrations
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mickelsamuel/migrationpilot@v1
with:
path: db/migration/
fail-on: criticalAuto-fix common issues
# Preview fixes without modifying files npx migrationpilot analyze db/migration/ --fix --dry-run # Apply fixes in-place npx migrationpilot analyze db/migration/ --fix
Flyway runs your migrations. MigrationPilot makes them safe.
80 safety rules. 12 auto-fixes. Lock analysis. Risk scoring. GitHub Action with PR comments. Add it to your Flyway workflow in 30 seconds.