safe_alter_table
Converts high-level schema change intents (add column, foreign key, index, etc.) into multi-step zero-downtime DDL recipes for safe table alterations.
Instructions
Convert a high-level intent ('add NOT NULL column with default', 'add NOT NULL', 'add foreign key', 'add CHECK', 'create index', 'drop index') into a multi-step zero-downtime DDL recipe. Each step has its own SQL, expected lock level, and notes. Pipe the resulting scriptSql through dry_run_sql_file for verification, then through executeSqlFile(useTransaction=false) for the production rollout (CONCURRENTLY operations cannot run inside a transaction).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes |