convex-migrations

Manage Convex database schema migrations with field additions and backfills.

2|4|Updated Jun 23, 2025
One-click install
npx skills add https://github.com/xrehpicx/vector --skill convex-migrations-xrehpicx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migrations
Source: https://github.com/xrehpicx/vector/tree/main/.agents/skills/convex-migrations
Command: npx skills add https://github.com/xrehpicx/vector --skill convex-migrations-xrehpicx

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill unit addresses the complexities of evolving Convex database schemas by providing strategies for safely adding new fields, backfilling data, removing deprecated fields, and more.

Core Features & Use Cases

  • Schema Evolution: Strategies for safely evolving the Convex database schema.
  • Field Addition: Methods for adding new fields and backfilling data to maintain data integrity.
  • Field Removal: Guidelines for removing deprecated fields while preserving data.
  • Index Management: Best practices for adding and using indexes in Convex.
  • Use Case: If you need to add a new field to a user table and backfill it with data without affecting the existing user data, this Skill can guide you through the process.

Quick Start

Use the convex-migrations skill to add a new 'profilePicture' field to the 'users' table in your Convex database.

Frequently Asked Questions about convex-migrations

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

FAQPage Schema
How do I add a new field to a Convex database without breaking existing data?

To add a new field to a Convex database safely, you use schema evolution strategies to introduce the field and backfill data without affecting existing records. This approach maintains data integrity during the migration.

What is zero-downtime database migration in Convex?

Zero-downtime database migration in Convex is the process of evolving your database schema while keeping the application fully operational. It involves strategies for adding fields, backfilling data, and removing deprecated fields without service interruption.

How do I backfill data into a new column in a Convex schema?

You backfill data into a new Convex schema field by using Convex mutation patterns to update existing documents. This ensures newly added fields are populated with the correct default or derived data without corrupting the current user data.

What are the best practices for removing deprecated fields from a Convex database?

Best practices for removing deprecated fields from a Convex database involve guidelines that preserve existing data during the transition. You safely phase out old schema fields without losing historical information or breaking active queries.

Do I need to know Convex mutation patterns to manage schema evolution?

Yes, managing schema evolution requires knowledge of Convex schema definition and mutation patterns. Understanding these mechanisms is necessary to safely execute data backfilling and handle zero-downtime deployments.

How does index management work when evolving a Convex database schema?

Index management during Convex schema evolution involves applying best practices for adding and using indexes. This ensures query performance remains optimal as you introduce new fields or modify the existing database structure.