convex-migration-helper

Plan and execute Convex schema migrations using the widen-migrate-narrow pattern.

3|10|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/wigxel/community-app --skill convex-migration-helper-wigxel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migration-helper
Source: https://github.com/wigxel/community-app/tree/main/.agents/skills/convex-migration-helper
Command: npx skills add https://github.com/wigxel/community-app --skill convex-migration-helper-wigxel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @convex-dev/migrations, and includes references (resource) components.

What problem does it solve?

This Skill mitigates the risks associated with breaking schema changes in Convex, such as data loss or deployment failures, by providing a structured, multi-step migration workflow.

Core Features & Use Cases

  • Widen-Migrate-Narrow Workflow: Guides users through the industry-standard pattern for zero-downtime schema evolution.
  • Migration Component Integration: Provides direct instructions for using the @convex-dev/migrations component to handle batching, state tracking, and resume-from-failure capabilities.
  • Use Case: When you need to rename a field or change a field type in a production database, this Skill ensures you safely widen the schema to support both formats, backfill the data, and finally narrow the schema without service interruption.

Quick Start

Use the convex-migration-helper to plan a schema migration for adding a required field to the users table.

Frequently Asked Questions about convex-migration-helper

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

FAQPage Schema
How do I safely execute breaking schema migrations in Convex?

To safely execute breaking schema migrations in Convex, use the widen-migrate-narrow pattern to widen the schema, backfill data, and narrow the schema without service interruption. This prevents data loss during production deployments.

What is the best way to rename a field or change a field type in a production Convex database?

The best way to rename or change a field type in a production Convex database is applying a structured multi-step workflow. You temporarily widen the schema to support both formats, migrate the data, and then narrow the schema to enforce the new definition.

Does the Convex migration workflow support batching and dry runs?

Yes, the Convex migration workflow supports batching, state tracking, and resume-from-failure capabilities by integrating with the @convex-dev/migrations component. This allows you to execute dry runs and monitor progress during complex data backfills.

How do I add a required field to an existing Convex table without downtime?

To add a required field to an existing Convex table without downtime, follow the widen-migrate-narrow workflow. You first make the field optional, backfill the required data for all existing records, and finally narrow the schema to make the field mandatory.

When do I need to use the widen-migrate-narrow pattern for Convex deployments?

You need the widen-migrate-narrow pattern for Convex deployments when making breaking schema changes like table reshaping or type changes. It mitigates deployment failure risks by ensuring both old and new formats are temporarily supported during data transition.