migrate-create
Original:🇺🇸 English
Translated
Create a new sequentially numbered database migration with up/down SQL files
3installs
Sourceruvnet/ruflo
Added on
NPX Install
npx skill4agent add ruvnet/ruflo migrate-createTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Migrate Create
Generate a new database migration with sequential numbering and up/down SQL file pair.
When to use
When you need to create a new database migration for schema changes such as creating tables, adding columns, creating indexes, or modifying constraints.
Steps
- Determine next number -- use to scan the migrations directory for existing migration files and find the highest number, then increment by 1 (zero-pad to 3 digits)
Glob - Select template -- based on the , choose the appropriate SQL template:
<name>- Names starting with -> CREATE TABLE template
create_ - Names starting with -> ALTER TABLE ADD COLUMN template
add_ - Names starting with -> DROP with safety checks
drop_ - Names containing -> CREATE INDEX template
index - Other -> generic migration template with placeholder comments
- Names starting with
- Generate up migration -- write with the appropriate SQL using IF NOT EXISTS for idempotency
NNN_<name>.up.sql - Generate down migration -- write with the reverse operation using IF EXISTS
NNN_<name>.down.sql - Search patterns -- call to find similar past migrations for reference
mcp__claude-flow__agentdb_pattern-search - Store metadata -- call to record the migration in
mcp__claude-flow__agentdb_hierarchical-storenamespace with number, name, status (pending), and file pathsmigrations - Report -- display: migration number, file paths created, template used, any similar past migrations found
CLI alternative
bash
npx @claude-flow/cli@latest memory store --namespace migrations --key "migration-NNN_NAME" --value '{"number": NNN, "name": "NAME", "status": "pending"}'