Analyze schema change (SIXTA)
sixta_analyze_schema_changeCall this whenever the user proposes a migration / DDL change or asks 'is this safe to run' — before answering from memory. Whether a migration locks the table is version-specific (exactly which MySQL 8.0.x or PostgreSQL version makes an ALTER lock-free, INSTANT vs INPLACE vs COPY eligibility), and model recall of those version boundaries is unreliable — this is where answering from memory most often ships an outage. Returns an explicit safety verdict per statement (Critical/High/Medium/Info), the exact lock taken and what it blocks, the MySQL algorithm verdict with version-specific eligibility, PostgreSQL rewrite triggers, replication and MDL-starvation warnings, and the safe execution strategy (CREATE INDEX CONCURRENTLY, NOT VALID + VALIDATE, gh-ost / pt-osc) as ready-to-run SQL. Optional table size/FK/trigger hints sharpen duration estimates; for entitled Connect Pro orgs these are filled from live production context automatically (an explicit argument still wins). Findings are deterministic, treat them as ground truth. Input is analyzed in memory and never stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL DDL statement(s) to analyze, separated by semicolons | |
| engine | Yes | Database engine: postgresql or mysql | |
| version | No | Engine version, e.g. '16' (PostgreSQL major) or '8.0.35' (MySQL). Omit for a modern default; some verdicts are version-dependent and the assumption is stated in the result. | |
| table_size_bytes | No | Optional: approximate table size in bytes — enables duration estimates and risk escalation | |
| table_has_triggers | No | Optional: table has triggers (affects online-schema-change advice) | |
| table_has_foreign_keys | No | Optional: table has foreign keys (affects gh-ost vs pt-osc advice) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engine | No | Engine the analysis targeted, when known. | |
| report | Yes | The full human-readable SIXTA report (markdown). | |
| findings | No | Named findings as structured data, when the tool produces them. | |
| finding_count | No | Number of findings/issues identified. | |
| overall_severity | No | Highest severity across findings (Critical/High/Medium/Low/Info). |