convex-migrate

Automate three-phase Convex schema migrations with optional field, backfill, and require steps.

2|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/misty-step/linejam --skill convex-migrate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migrate
Source: https://github.com/misty-step/linejam/tree/main/.agents/skills/convex-migrate
Command: npx skills add https://github.com/misty-step/linejam --skill convex-migrate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drive a three-phase Convex schema migration to add an optional field, backfill existing data, and require the field going forward with Canary-watched grace windows and ADR emission.

Core Features & Use Cases

  • Phase 1: Add optional field to the targeted table to enable gradual rollout.
  • Phase 2: Backfill existing rows in paginated batches with safe guards.
  • Phase 3: Require the field and enforce at read/write time; ADR emitted; prod grace window.

Quick Start

Run the convex-migrate tool for your target table.field to start the three-phase migration workflow.

Frequently Asked Questions about convex-migrate

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

FAQPage Schema
How do I migrate a Convex schema field from optional to required without downtime?

Migrating a Convex schema from optional to required without downtime requires a three-phase approach: add the optional field, run a paginated backfill on existing rows, then enforce the field as required. This progression prevents write failures during the transition.

What is a three-phase schema migration pattern for live Convex deployments?

A three-phase schema migration pattern sequentially adds an optional field, backfills existing data in batches, and then requires the field going forward. This pattern allows live deployments to transition schemas safely while maintaining continuous read and write availability.

How do I backfill existing rows in Convex during a live schema migration?

To backfill existing rows during a live Convex schema migration, use a paginated internal action that processes rows in batches. This approach includes safe guards and idempotent operations to ensure data consistency without overwhelming the database.

Can I use canary-based validation when transitioning a required field in Convex?

Yes, canary-based validation is supported during a Convex schema migration. The process includes a canary-watched grace window during the final phase where the field becomes required, allowing you to monitor for errors before fully enforcing the constraint in production.

Does this Convex migration workflow generate architecture decision records?

Yes, the Convex schema migration workflow automatically emits an Architecture Decision Record (ADR). This document captures the details of the optional-to-required field transition, ensuring the migration rationale and steps are formally recorded for future reference.

What are the limitations of running an idempotent backfill on a Convex database?

An idempotent backfill on a Convex database requires paginated batch processing with safe guards to prevent duplicate writes. It is limited by the need for prod gating and careful canary monitoring to ensure existing rows are fully updated before enforcing the required field constraint.