export_alter_sql
Generate ALTER migration scripts by diffing a baseline model against the current state, preserving renames, commenting destructive changes, and flagging unsupported changes with WARNING comments.
Instructions
Generates a migration (ALTER) script from the physical diff between a baseline and the current model — renames stay renames (stable-id matching), destructive changes come commented out, unsupported changes are flagged as [WARNING] comments. Baselines from the same project lineage ({file}/{erdId}) preserve renames; freshly parsed SQL/DBML text falls back to name matching. Pro plan required; requires login.
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": {
"before": "<before>",
"after": "<after>"
},
"name": "export_alter_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | Target state (the current model) | |
| before | Yes | Baseline (e.g. the state last applied to the database) | |
| dialect | No | SQL dialect |