convex-migrate

Migrate schemas and backfill data on deployed Convex apps using @convex-dev/migrations.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-migrate-tehzeeb07
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: convex-migrate
Source: https://github.com/Tehzeeb07/CodeRush/tree/main/.agents/skills/convex-migrate
Command: npx skills add https://github.com/Tehzeeb07/CodeRush --skill convex-migrate-tehzeeb07

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @convex-dev/migrations.

What problem does it solve? Changing the schema of a live Convex app risks breaking existing data: tightening a validator before old rows are updated causes deploys to reject them and breaks the production app. This Skill provides a safe, ordered workflow for evolving schemas without downtime. ## Core Features & Use Cases - Staged Schema Changes: Add new fields as optional first so deploys never reject existing rows. - Guided Backfills: Install @convex-dev/migrations and write migrations that transform or backfill existing rows. - Verification Before Tightening: Verify row counts and validity before making a field required. - Use Case: You need to add a required role field to a users table in production. Follow the workflow to add it as optional, backfill all existing users, verify the counts, then tighten the validator. ## Quick Start Help me add a required field to my live Convex app's schema and backfill the existing rows safely.

Frequently Asked Questions about convex-migrate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I change a Convex schema without breaking existing data?▼

Add the new field as optional first so deploys accept existing rows, then install @convex-dev/migrations and write a backfill migration. After running it and verifying all rows are valid, tighten the validator to make the field required.

How do I backfill data in a Convex app?▼

Install the @convex-dev/migrations package and write a migration that transforms or fills existing rows. Run the migration against the deployed app, then verify row counts before and after to confirm completeness.

Why does my Convex deploy reject existing rows after a schema change?▼

The validator was tightened before existing rows were backfilled, so old rows fail the new validation. Make the field optional first, run the backfill migration, and only require the field after all rows are valid.

When should I make a new Convex field required?▼

Only after the backfill migration has completed and every existing row passes the new validator. Verify row counts before and after the migration, then tighten the validator in a follow-up deploy.