generate_zero_downtime_ddl
Rewrites hazardous PostgreSQL/MySQL DDL migrations into safe multi-phase Expand/Contract runbooks to avoid lock queues and table rewrites, including rollback scripts.
Instructions
Rewrites hazardous SQL migrations into multi-phase Expand/Contract runbooks using CREATE INDEX CONCURRENTLY, NOT VALID + VALIDATE CONSTRAINT, lock_timeout, ALGORITHM=INSTANT, and emergency Rollback scripts.
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": "generate_zero_downtime_ddl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qps | No | Estimated peak production queries per second (defaults to 800). | |
| sql | Yes | Hazardous or unguarded PostgreSQL/MySQL DDL migration script to rewrite into safe phases. | |
| dialect | No | SQL dialect override (defaults to auto). | |
| tableRows | No | Estimated row count on the target table (defaults to 10000000). |