migration_generate
Compare old and new CREATE TABLE schemas to generate ALTER TABLE migration statements with both up and down migrations.
Instructions
Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements with both up and down migrations.
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": {
"old_schema": "<old_schema>",
"new_schema": "<new_schema>"
},
"name": "migration_generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dialect | No | SQL dialect for migration syntax (default: postgresql) | |
| new_schema | Yes | The new/target schema (CREATE TABLE statements) | |
| old_schema | Yes | The old/current schema (CREATE TABLE statements) |