C

convex-migrate

by @convexv
4.6(120)

This skill safely migrates the schema and backfills existing data on a live Convex deployment: it makes new fields optional first so deploys don't reject legacy rows, writes a @convex-dev/migrations backfill, runs it, verifies every row, and only then tightens the validator. It turns a risky "change a field and break production" operation into a reversible four-step workflow for teams that must evolve their schema without downtime or data loss.

convexdatabase-migrationschema-migrationbackfilldatabaseGitHub
Installation
npx skills add https://github.com/convex/agent-skills --skill convex-migrate
compare_arrows

Before / After Comparison

1 组
Before

Developers edit a field directly on a deployed Convex app and mark it required; after deploy the existing rows fail the new validator, production endpoints error out, and the team must roll back and hand-write scripts to patch data row by row.

After

This skill makes the field optional so the deploy passes, writes a @convex-dev/migrations backfill job, verifies row counts before and after, and only then tightens the validator to required — with zero downtime.

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

  1. Make the new field optional first (so deploy doesn't reject existing rows).
  2. Install @convex-dev/migrations; write a migration that backfills/transforms existing rows.
  3. Run the migration; verify all rows are valid.
  4. 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.

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs35.1K
Rating4.6 / 5.0
Version
Updated2026年10月23日
Comparisons1

User Rating

4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%

Rate this Skill

0.0

Compatible Platforms

🤖claude-code

Timeline

Created2026年10月17日
Last Updated2026年10月23日
🎁 Agent Knowledge Cards
Survey