Analyze a SQL migration for locking hazards
analyze_migrationLint PostgreSQL migrations for dangerous locking operations and receive PASS/REVIEW/BLOCK verdicts with safe rewrites before applying.
Instructions
Lint a PostgreSQL migration for operations that take dangerous locks (table rewrites, blocking index builds, validating constraints, destructive/breaking changes) and return a PASS/REVIEW/BLOCK verdict with per-statement findings and safe rewrites. Call this before applying or approving any migration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The full SQL migration script to analyze. | |
| assumeLargeTables | No | Assume target tables are large/hot, so scans and rewrites are flagged. Default true (fail safe). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stats | Yes | ||
| summary | Yes | ||
| verdict | Yes | ||
| findings | Yes |