Agent Skills
› openclaw/clawhub
› convex-migrate
convex-migrate
GitHub指导在 Convex 应用中安全迁移数据库架构与数据,通过分步策略(先可选、后必填)和回填脚本避免破坏线上数据。
Trigger Scenarios
需要修改已部署应用的数据库表结构
需要对现有数据进行批量转换或填充
Install
npx skills add openclaw/clawhub --skill convex-migrate -g -y
SKILL.md
Frontmatter
{
"name": "convex-migrate",
"description": "Migrate schema + backfill data on a deployed Convex app using @convex-dev\/migrations."
}
Migrate the schema / data on a live app
Change a deployed schema without breaking existing data: stage the schema change, install @convex-dev/migrations, write a backfill that makes old rows valid, run it, and verify before tightening the validator.
Workflow
- Make the new field optional first (so deploy doesn't reject existing rows).
- Install @convex-dev/migrations; write a migration that backfills/transforms existing rows.
- Run the migration; verify all rows are valid.
- Tighten the validator (make the field required) once the backfill is complete.
Rules
- Never tighten a validator before the backfill completes — it rejects existing rows and breaks the live app.
- Add new fields as optional first, migrate, then require.
- Verify row counts before and after.
Version History
- d6a8c68 Current 2026-08-20 02:43


