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.
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) |