一键导入
create-migration
Create new SQL migration files for multiple database dialects (sqlite3, mysql, postgres, tidb, redshift, clickhouse)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create new SQL migration files for multiple database dialects (sqlite3, mysql, postgres, tidb, redshift, clickhouse)
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
| name | create-migration |
| description | Create new SQL migration files for multiple database dialects (sqlite3, mysql, postgres, tidb, redshift, clickhouse) |
| disable-model-invocation | true |
| allowed-tools | Bash |
| argument-hint | ["migration_name"] |
Create new migration files named $ARGUMENTS for all configured database dialects.
Run the wrapper script:
bash scripts/create-migration.sh $ARGUMENTS
If the script is not found, fall back to finding all rockhopper_*.yaml config files and running rockhopper --config <config> create --type sql $ARGUMENTS for each.
After creation, list the newly created files and remind the user to edit all migration files since each dialect may need different SQL syntax. OLAP dialects diverge the most — e.g. ClickHouse tables need a MergeTree() / ORDER BY engine clause instead of a primary key, use Int64/String/DateTime types, and have no AUTO_INCREMENT.
-- @package packagename
-- +up
CREATE TABLE example (id INT PRIMARY KEY);
-- +down
DROP TABLE example;
For multi-statement blocks, use -- +begin / -- +end. Use -- !txn to disable transaction wrapping.