convex-migration-helper

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

2|Updated Jul 1, 2025
One-click install
npx skills add https://github.com/RinKhimera/NOMAQbanq --skill convex-migration-helper-rinkhimera
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migration-helper
Source: https://github.com/RinKhimera/NOMAQbanq/tree/main/.agents/skills/convex-migration-helper
Command: npx skills add https://github.com/RinKhimera/NOMAQbanq --skill convex-migration-helper-rinkhimera

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Safely plan and execute Convex schema and data migrations that would otherwise fail schema validation or risk data inconsistency, enabling multi-deploy widen-migrate-narrow workflows and online backfills with minimal downtime.

Core Features & Use Cases

  • Migration workflow guidance: Step-by-step multi-deploy pattern (widen, migrate, narrow) for adding required fields, changing types, splitting or merging tables, and renames.
  • Migrations component integration: Use the @convex-dev/migrations component for batched, resumable, cursored migrations with dry-run and status monitoring.
  • Safety patterns and pitfalls: Recommendations for dual-write/dual-read strategies, when to use small-table shortcuts, and checks to avoid transaction limits or missed documents.
  • Use case: Add a new required role field to an existing users table, backfill existing users with a default role, verify no unmigrated documents remain, and then make the field required.

Quick Start

Plan a widen-migrate-narrow migration: update the schema to accept both formats, deploy code that reads both and writes the new format, define and dry-run a migrations component job to backfill existing documents, run the migration to completion, then narrow the schema and remove legacy handling.

Frequently Asked Questions about convex-migration-helper

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

FAQPage Schema
How do I perform zero-downtime schema migrations in Convex?

Split or merge Convex tables by applying the widen-migrate-narrow workflow to support both schemas simultaneously, backfilling existing documents into the new structure, verifying completion, and then narrowing the schema to remove the legacy table.

Can I backfill existing Convex documents without downtime?

To add a required field to a Convex table, widen the schema to make the field optional, deploy code that dual-writes the new field while dual-reading both formats, backfill existing documents with a default value, then narrow the schema to make it required.

What is the best way to rename a field in a Convex database?

The best way to rename a Convex database field is the widen-migrate-narrow pattern: add the new field to the schema, deploy code that dual-writes both fields, run a migration job to backfill the new field from the old one, then narrow the schema to drop the old field.

How do I change a field type in Convex without breaking schema validation?

When running Convex data migrations, avoid missed documents and transaction limits by using cursored pagination and batched processing via the @convex-dev/migrations component, which tracks migration state and supports resumable execution for large datasets.

Does the @convex-dev/migrations component support dry-run and resume functionality?

Yes, the @convex-dev/migrations component supports dry-run functionality to preview changes and resume capabilities through state tracking, enabling safe batched online migrations with cursored pagination to handle large datasets without exceeding transaction limits.