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


