get-convex/agent-skills

convex-migration-helper

兼容旧数据地完成分批回填与schema收紧

  • 历史版本 SKILL.md
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

convex-migration-helper 是什么?

convex-migration-helper 用“放宽schema、分批迁移、收紧schema”的方式处理Convex已有数据的不兼容变更。它强调迁移窗口内兼容旧新格式,并为持续写入、失败恢复和最终全量核对安排步骤。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 已有数据增加必填字段、改类型、拆合表或重命名字段。

这些情况不适合

  • 新项目空库,或无需回填的可选字段、新表等简单变更。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 convex-migration-helper,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 convex-migration-helper

请在 Codex 的当前工作环境中安装并检查 convex-migration-helper 这个 Skill。

项目身份:get-convex/agent-skills / convex-migration-helper
来源:https://github.com/get-convex/agent-skills/blob/294d4f05edb5e7b57f3c534b79dd00e8e3d7b60d/skills/convex-migration-helper/SKILL.md
已定位的源文件:skills/convex-migration-helper/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 了解现有schema、数据量、读写入口与目标部署,准备备份/恢复安排和可演练环境;复杂迁移保留migrations组件参考。

会得到什么

  • 多次部署的迁移计划、兼容代码、分批回填及完成核对证据,保留失败恢复方式。

实际使用顺序

  1. 先允许旧新格式共存,读端兼容两者,新写入采用目标格式。
  2. 通过@convex-dev/migrations等有界批处理定义回填,先dry run检查逻辑,再在授权目标运行并监控游标与恢复状态。
  3. 核对全部现有记录与迁移期间新写记录,确认没有漏回填,再将字段收紧为目标要求。
  4. 稳定后清理兼容代码;旧字段优先明确弃用,不在未确认数据价值时直接删除。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

用 convex-migration-helper 为现有users表增加必填normalizedEmail规划迁移。先让字段可选、读端兼容且新写入填充,再设计分批dry run与漏项核对。只有全量回填并检查迁移期间新数据后才能收紧schema;现在先在预览环境准备,不改生产数据。
预期结果

预期迁移期间应用能处理两种数据格式,最终是否完成由真实核对决定;本站未执行本例。

使用前先看这些限制

使用条件与边界

  • 回填任务显示结束不证明期间新写数据已符合新格式,读写兼容需先部署。
  • 大表collect可能触及事务限额,不能用一次全量读取替代分页迁移。
针对这个 Skill 的疑问

常见问题

为什么不直接把新字段设为必填再回填?

现有记录没有该字段时schema不匹配,部署会被拒绝;来源要求先放宽再迁移,确认完成后才收紧。

需要核对时再展开原文

来源原文与资料状态

来源版本
历史源文件(2026-05-28T10:22:12+08:00);原目录已变更,本页解释所链接的历史版本,不代表当前安装方式。
源文件
已保存 SKILL.md,抓取于 2026-11-17T10:54:39.501Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/convex-migration-helper/SKILL.md · 抓取时间 2026-11-17T10:54:39.501Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev/migrations. Use for breaking schema changes, backfills, table reshaping, or zero-downtime rollouts.

查看源文件章节 / Source sections
  • 原文:Convex Migration Helper
  • 原文:When to Use
  • 原文:When Not to Use
  • 原文:Key Concepts
  • 原文:Schema Validation Drives the Workflow
  • 原文:Online Migrations
  • 原文:Prefer New Fields Over Changing Types
  • 原文:Don't Delete Data
  • 原文:Safe Changes (No Migration Needed)
  • 原文:Adding Optional Field
  • 原文:Adding New Table
  • 原文:Adding Index
  • 原文:Breaking Changes: The Deployment Workflow
  • 原文:Using the Migrations Component
  • 原文:Common Migration Patterns
  • 原文:Common Pitfalls
  • 原文:Migration Checklist
原文:Convex Migration Helper

Safely migrate Convex schemas and data when making breaking changes.

原文:When to Use

- Adding new required fields to existing tables - Changing field types or structure - Splitting or merging tables - Renaming or deleting fields - Migrating from nested to relational data

原文:When Not to Use

- Greenfield schema with no existing data in production or dev - Adding optional fields that do not need backfilling - Adding new tables with no existing data to migrate - Adding or removing indexes with no correctness concern - Questions about Convex schema design without a migration need

原文:Schema Validation Drives the Workflow

Convex will not let you deploy a schema that does not match the data at rest. This is the fundamental constraint that shapes every migration: - You cannot add a required field if existing documents don't have it - You cannot change a field's type if existing documents have the old type - You cannot remove a field from the schema if existing documents still have it This means migrations follow a predictable pattern: **widen the schema, migrate the data, narrow the schema**.

原文:Online Migrations

Convex migrations run online, meaning the app continues serving requests while data is updated asynchronously in batches. During the migration window, your code must handle both old and new data formats.

原文:Prefer New Fields Over Changing Types

When changing the shape of data, create a new field rather than modifying an existing one. This makes the transition safer and easier to roll back.

文件 SHA256:77bc11973377357633cf80c1d111abd52daaa4249cc6ed25b76fac51457ce7ce

仓库许可证记录:未提供;not-established,查看来源。

Skills.sh收录简介 · 2026-07-28

Plans Convex schema and data migrations with widen-migrate-narrow and @convex-dev/migrations. Use for breaking schema changes, backfills, table reshaping, or…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识convex-migration-helper
来源仓库get-convex/agent-skills
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次233
快照累计安装量91892

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源