Agent Skills
› openclaw/clawhub
› convex-migrate
convex-migrate
GitHub用于在部署的 Convex 应用中安全迁移数据库模式并回填数据。通过分阶段添加可选字段、执行回填脚本及验证数据,确保在不破坏现有数据的前提下完成架构变更。
Trigger Scenarios
需要修改已部署应用的数据库结构
需要为现有数据表添加新字段并填充历史数据
执行数据库 schema 变更以避免生产环境报错
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


