convex-migrations

Automate batched Convex schema migrations with progress tracking and failure handling.

Updated Mar 6, 2026
One-click install
npx skills add https://github.com/mmtftr/bakathon --skill convex-migrations-mmtftr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migrations
Source: https://github.com/mmtftr/bakathon/tree/main/.opencode/skills/convex-migrations
Command: npx skills add https://github.com/mmtftr/bakathon --skill convex-migrations-mmtftr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Evolving Convex schemas safely is challenging due to the risk of data loss, downtime, and inconsistent data; this Skill provides patterns and tooling to migrate schemas in a controlled, batched manner.

Core Features & Use Cases

  • Migration patterns for adding, removing, or renaming fields with backfills and zero-downtime deployment.
  • Migration runner pattern to track progress across batches, handle failures, and complete migrations reliably.
  • Code-assisted guidance for common schema changes (adding indices, changing field types) with safe, incremental steps.

Quick Start

Define a migration, start it with the migration runner, and monitor progress until completion.

Frequently Asked Questions about convex-migrations

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

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

Zero-downtime Convex schema migrations are automated using a reusable migration runner that applies batched updates to tables, fields, and indices. It tracks progress and handles failures to ensure data consistency without service interruptions.

What is the safest way to rename fields or change field types in Convex?

Renaming fields or changing field types in Convex is handled safely through incremental, code-assisted migration patterns. The process includes backfilling data and tracking batch progress to prevent data loss during the schema evolution.

How does batched backfill progress tracking work for Convex migrations?

Batched backfill progress tracking relies on a migration runner pattern utilizing start, update, complete, and fail mutations. This ensures migrations are idempotent and recoverable by monitoring each batch until the schema update finishes successfully.

Can I recover a failed Convex schema migration midway through a batch?

Yes, failed Convex schema migrations are recoverable. The migration runner uses start, update, complete, and fail mutations to handle failures gracefully, ensuring the migration can resume or complete reliably without losing prior batch progress.

When do I need a migration runner for evolving Convex database schemas?

A migration runner is needed when evolving Convex schemas involves complex changes like adding indices, removing fields, or large data backfills. It provides controlled, batched execution to mitigate risks of downtime and inconsistent data.