convex-migration-helper

Plan and execute safe schema migrations for Convex applications.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers safely plan and execute schema migrations for Convex, a real-time backend, preventing data loss and application downtime during critical schema changes.

Core Features & Use Cases

  • Schema Migration Planning: Provides guidance on safe vs. breaking schema changes.
  • Data Backfilling: Offers patterns for migrating existing data to new schema structures.
  • Zero-Downtime Strategies: Demonstrates techniques like dual-writing for continuous availability.
  • Use Case: You need to add a new required field to an existing users table in Convex. This Skill guides you through adding it as optional, backfilling data with a default value, and then making it required, ensuring no users are affected.

Quick Start

Use the convex-migration-helper skill to add a new 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 add a new required field to an existing Convex table without downtime?

To add a required field in Convex without downtime, you first add the field as optional, run an internal mutation to backfill existing records with a default value, and then update the schema to make the field required. This ensures data integrity and continuous availability.

What is the best way to handle breaking schema changes in a Convex database?

Breaking schema changes in a Convex database, such as changing data types or renaming fields, require a staged migration process. This involves dual-writing to both old and new structures, backfilling data via internal mutations, and safely updating the schema definition to prevent data loss.

How does data backfilling work during a Convex schema migration?

Data backfilling in Convex schema migrations uses internal mutations to iterate through existing documents and update them to match the new schema structure. This allows you to programmatically manipulate and convert historical data safely before finalizing the schema definition.

Can I rename or split existing tables in Convex without losing real-time data?

Yes, you can rename or split Convex tables without data loss by employing zero-downtime strategies. This involves creating the new table structure, dual-writing new data to both schemas, backfilling historical records, and then switching application reads before removing the old table.

What do I need to know before executing schema migrations in Convex?

Before executing Convex schema migrations, you need a solid understanding of Convex schema definitions and internal mutations. Familiarity with additive versus breaking changes and zero-downtime data integrity strategies is essential for planning a safe migration.

Why does changing a data type in Convex require a multi-step migration?

Changing a data type in Convex requires a multi-step migration because immediate schema enforcement would invalidate existing documents. By using a phased approach with dual-writing and data backfilling, you ensure all existing records are safely converted before enforcing the new type requirements.