generate_migration
Create a database migration class by defining table name and field types for WordPress plugins.
Instructions
Generate a database migration file with proper column definitions. Specify table name and fields with types, and get a complete migration class.
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": {
"rootNamespace": "<rootNamespace>",
"tableName": "<tableName>",
"fields": "<fields>"
},
"name": "generate_migration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rootNamespace | Yes | Plugin root namespace | |
| tableName | Yes | Table name without prefix (e.g., "testimonials") | |
| fields | Yes | Field definitions: "name:type" pairs, comma-separated. Types: string, text, int, bigint, bool, datetime, decimal, json, enum. Example: "title:string,content:text,rating:int,status:enum,published_at:datetime" | |
| action | No | Migration action (default: create) |