C
convex-migrate
by @convexv
4.6(120)
该 Skill 用于在已上线的 Convex 应用中安全地变更 schema 并回填历史数据:先把新字段改为可选以免部署拒绝旧行,再借助 @convex-dev/migrations 编写迁移脚本回填、校验全部行数据,确认无误后才收紧校验器。它把「改字段就炸线上」的高风险操作拆成可回滚的四步流程,适合需要在线演进数据库结构又不允许停服或丢数据的团队。
安装方式
npx skills add https://github.com/convex/agent-skills --skill convex-migratecompare_arrows
Before / After 效果对比
1 组使用前
开发者直接在已上线的 Convex 应用上改字段并设为必填,部署后旧的存量行不满足新校验器,线上接口立刻报错,只能紧急回滚并把代码改回去,再手工写脚本一行行补数据。
使用后
该 Skill 先把字段设为可选保证部署通过,再用 @convex-dev/migrations 写回填任务,跑完比对前后行数确认全部有效,最后才把校验器收紧为必填,全程线上不中断。
SKILL.md
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.
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量35.1K
评分4.6 / 5.0
版本
更新日期2026年10月23日
对比案例1 组
用户评分
4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%
为此 Skill 评分
0.0
兼容平台
🤖claude-code
时间线
创建2026年10月17日
最后更新2026年10月23日