audit_sql_migration_locks
Audit PostgreSQL and MySQL migration DDL for ACCESS EXCLUSIVE lock queues, full table rewrites, non-concurrent index builds, unvalidated foreign keys, and missing lock_timeout guards before deployment.
Instructions
Audits PostgreSQL 14-17 and MySQL 8.0/8.4 DDL statements for ACCESS EXCLUSIVE lock queues, full table rewrites, non-concurrent index builds, unvalidated foreign keys, and missing lock_timeout guards.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "audit_sql_migration_locks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qps | No | Estimated peak production queries per second on the target table (defaults to 800). | |
| sql | Yes | Raw SQL migration script (PostgreSQL or MySQL) to inspect for lock and rewrite hazards. | |
| dialect | No | SQL dialect override (defaults to auto-detection between PostgreSQL and MySQL). | |
| tableRows | No | Estimated row count of the target table used for lock duration simulation (defaults to 10000000). |