Claude-skill-registry convex-migration
guidance on how to properly do data migrations in Convex
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/convex-migration" ~/.claude/skills/majiayu000-claude-skill-registry-convex-migration && rm -rf "$T"
manifest:
skills/data/convex-migration/SKILL.mdsource content
Use
@convex-dev/migrations in convex/migrations.ts (reference convex_migrations.md for full guidance). The standard flow is:
- loosen schema/app to tolerate old+new values
- add
inmigrations.define({ table, migrateOne })
(idempotent; skip no‑ops; no external APIs).convex/migrations.ts - dry run:
npx convex run migrations:runYourFn '{"dryRun":true,"cursor":null}' - full run:
*npx convex run migrations:runYourFn '{"cursor":null}' - monitor:
npx convex run --component migrations lib:getStatus --watch - cancel:
.npx convex run --component migrations lib:cancel '{"name":"migrations:yourFnName"}'
*
"cursor":null makes it to real work from the start (as opposed to the dry-run default); omit only when resuming from a specific cursor.