stripe-migration-pattern

Run resumable six-phase Convex schema migrations with checkpoint tracking.

7|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/planetaryescape/blah.chat --skill stripe-migration-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stripe-migration-pattern
Source: https://github.com/planetaryescape/blah.chat/tree/main/.claude/skills/stripe-migration-pattern
Command: npx skills add https://github.com/planetaryescape/blah.chat --skill stripe-migration-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured pattern to perform zero-downtime migrations on Convex schema changes. It enables resumable, multi-phase migrations that minimize risk and allow rollback opportunities between phases.

Core Features & Use Cases

  • Six-phase migration pattern: schema, backfill, dual-write, dual-read, cleanup, and complete, designed to migrate large datasets safely.
  • Checkpoint-driven progress: track per-migration progress with checkpoint data to resume after outages.
  • Cursor-based backfill: migrate data in batches without relying on offsets, ensuring scalability.
  • Dual-write/dual-read strategy: migrate to new structures while maintaining compatibility and enabling safe cutovers.
  • Use Case: upgrading a Convex schema in a production app with 1M+ records, minimizing downtime.

Quick Start

To begin, initialize a migration with a unique ID, configure batch sizes, and run the orchestrator to progress through phases. Monitor checkpoints and complete the migration once the final phase finishes. Then perform the cleanup phase to remove old fields.

Frequently Asked Questions about stripe-migration-pattern

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

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

Zero-downtime Convex schema migrations require a resumable six-phase pattern: schema, backfill, dual-write, dual-read, cleanup, and complete. This approach uses checkpoint tracking and cursor-based batches to ensure data integrity during complex evolutions.

What is the dual-write and dual-read strategy for database migrations?

The dual-write and dual-read strategy allows you to migrate to new schema structures while maintaining compatibility. It enables safe cutovers by writing and reading from both old and new data formats simultaneously before finalizing the cleanup phase.

Can I resume a Convex migration after an outage?

You can resume a Convex migration after an outage by using checkpoint-driven progress. The migration pattern tracks per-migration progress with checkpoint data, allowing the orchestrator to pick up exactly where it left off without restarting.

How do I backfill large Convex datasets without using offsets?

You backfill large Convex datasets using a cursor-based approach instead of offsets. This method migrates data in sequential batches, ensuring scalability and preventing performance degradation on production applications with over a million records.

How do I safely remove old fields after a Convex schema upgrade?

To safely remove old fields after a Convex schema upgrade, execute the cleanup phase after dual-read and dual-write verification succeed. This final phase removes deprecated structures once the new schema is fully operational and verified.