# Create Migration

> Create new SQL migration files for multiple database dialects (sqlite3, mysql, postgres, tidb, redshift, clickhouse)

- Skill: `c9s/create-migration-2` (Agent Skill)
- Install (CLI): `npx skillmds@latest add c9s/create-migration-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/c9s/create-migration-2/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: c9s (https://skillmd.com/u/c9s)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/c9s/create-migration-2

---


Create new migration files named `$ARGUMENTS` for all configured database dialects.

Run the wrapper script:

```bash
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`.

## Migration file format reference

```sql
-- @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.

