Agent Skills
› openclaw/clawhub
› convex-migrate
convex-migrate
GitHub指导在已部署的Convex应用中安全迁移数据库模式并回填数据。通过分阶段添加字段、使用migrations包执行回填及验证,确保不破坏线上数据,最后收紧校验器。
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


