generate_rollback
Create reverse DDL to undo a SQL migration, producing rollback SQL with warnings for irreversible operations and Flyway schema_history cleanup.
Instructions
Generate reverse DDL to undo a SQL migration. Produces rollback SQL with warnings for irreversible operations (DROP TABLE, DROP COLUMN, type changes). Includes Flyway schema_history cleanup.
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": {
"filename": "<filename>",
"sql": "<sql>"
},
"name": "generate_rollback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL content of the migration file | |
| filename | Yes | Migration filename (e.g., V2__add_user_email.sql) |