LabscoConnect MCP ↗
get-convex logo✓ Official★ 63

convex-migrate

Changes the data structure of a live Convex app without breaking existing records: the new field starts optional, a backfill fills it in on old rows, and only then is it made required.

by get-convexpart of get-convex/agent-skills

One of 30 skills in the get-convex/agent-skills package — works on its own, and pairs well with its siblings.

WHEN YOUR AGENT SHOULD USE IT

A QUICK BOUNDARY

USE FOR

  • Add a required field to a table that already has data.
  • Rewrite old records into a new shape with a backfill.
  • Compare row counts before and after the change.

DO NOT USE FOR

  • Rehearsing on a copy of production first: that is the migrate-rehearse skill.

Documents

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.

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.

Installation

Copy & paste — that's it
npx skills add get-convex/agent-skills --skill "convex-migrate" --full-depth

Run this in your project — your agent picks the skill up automatically.

License

Licensed under Apache-2.0— you can use, modify, and redistribute it under that license's terms.

View the full license file on GitHub →