convex-migrations

Evolve Convex database schemas with zero-downtime migration patterns.

1|Updated Feb 7, 2026
One-click install
npx skills add https://github.com/aarsh21/better-issues --skill convex-migrations-aarsh21
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convex-migrations
Source: https://github.com/aarsh21/better-issues/tree/main/.agents/skills/convex-migrations
Command: npx skills add https://github.com/aarsh21/better-issues --skill convex-migrations-aarsh21

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 Convex databases, 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 and data transformations without interrupting service.
  • Index Management: Add and utilize new indexes for improved query performance.
  • 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

Use the convex-migrations skill to add a new optional field called avatarUrl to the users table.

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 new required field to an existing Convex database table?

To add a required field to a Convex database table, first define the field as optional, deploy a mutation to backfill existing documents with default values, and then update the schema to make the field required.

What is the best way to perform zero-downtime schema migrations in Convex?

Zero-downtime schema migrations in Convex use a reusable migration runner system to apply data transformations and schema changes gradually, ensuring data integrity without interrupting active service.

How do I rename or remove deprecated fields in a Convex schema without breaking queries?

Removing or renaming fields in a Convex schema involves adding the new field, migrating existing data via backfill mutations, updating application queries, and safely removing the deprecated field in a subsequent deployment.

Can I change a field type or add new indexes to a Convex table after it has data?

You can change field types and add new indexes to a populated Convex table by running data transformation mutations to normalize existing values before enforcing the new schema validation and index definitions.

How does data backfilling work when evolving a Convex database schema?

Data backfilling in Convex schema evolution works by deploying custom mutations that iterate through existing table documents, computing and populating missing field values based on your application logic before strict schema enforcement.