convex-migrations

Manage Convex schema evolution and data migration strategies.

Updated Feb 9, 2025
One-click install
npx skills add https://github.com/obada-jaras/nextboost-starter --skill convex-migrations-obada-jaras
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migrations
Source: https://github.com/obada-jaras/nextboost-starter/tree/main/.cursor/skills/convex-migrations
Command: npx skills add https://github.com/obada-jaras/nextboost-starter --skill convex-migrations-obada-jaras

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides robust strategies and patterns for managing schema changes in your Convex database, ensuring data integrity and minimizing downtime during evolution.

Core Features & Use Cases

  • Schema Evolution: Safely add, remove, or rename fields in your Convex tables.
  • Data Backfilling: Implement mutations to populate new fields with existing data.
  • Zero-Downtime Migrations: Apply schema changes without interrupting application availability.
  • Use Case: You need to add a new avatarUrl field to your users table. This Skill guides you through making the field optional, backfilling existing users with default avatars, and then making the field required.

Quick Start

Follow the documentation to add a new optional field to your user schema and backfill existing data.

Frequently Asked Questions about convex-migrations

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

FAQPage Schema
How do I safely add a required field to an existing Convex database schema?

Zero-downtime schema migration in Convex involves applying schema changes without interrupting application availability, achieved by utilizing the internal mutation system for batch processing and continuous state management.

How do I backfill data for existing records during a Convex schema migration?

To backfill data during a Convex schema migration, you implement internal mutations that run as batch processing tasks to populate newly added optional fields with existing or default data across all table records.

What is the best way to rename or remove fields in Convex tables without breaking the backend?

The best way to rename or remove fields in Convex tables without breaking the backend is to follow a staged schema evolution strategy, ensuring old fields remain accessible while new ones are populated and validated.

Does this Convex migration approach support zero-downtime data modeling changes?

Yes, this approach supports zero-downtime data modeling changes by leveraging Convex's internal mutation system to manage batch processing and state management, ensuring continuous application availability during schema evolution.

What are the limitations of using internal mutations for Convex data migrations?

A limitation of using internal mutations for Convex data migrations is managing batch processing state manually, requiring careful mutation design to handle large datasets without exceeding system operational constraints.