Skip to main content

migrate

Safely migrate the schema + backfill data on a deployed Convex app with @convex-dev/migrations. TRIGGER when changing the schema on a live app, backfilling data, or after a schema-validation error from a change. SKIP a fresh local app.

Ir para a instalação

Informações da origem

Repositório
get-convex/convex-backend-skill
Última atividade na origem
7 de julho de 2026 às 16:41
Idioma detectado do SKILL.md
inglês
Estrelas
6
Forks
8

Opções de instalação

Por padrão, está selecionado o prompt que primeiro revisa a origem. Você pode mudar para um comando direto ou baixar uma cópia local.

Revise os arquivos de origem

Leia o SKILL.md e os arquivos complementares exibidos pelo SkillsMP antes de decidir se vai instalar.

Exibindo SKILL.md

SKILL.md
Instruções da origem · Visualização somente leitura
name
migrate
description
Safely migrate the schema + backfill data on a deployed Convex app with @convex-dev/migrations. TRIGGER when changing the schema on a live app, backfilling data, or after a schema-validation error from a change. SKIP a fresh local app.
# Migrate the schema / data on a live app Change a deployed schema without breaking existing data: stage the schema change, install @convex-dev/migrations, write a backfill that makes old rows valid, run it, and verify before tightening the validator. ## Steps 1. Make the new field optional first (so deploy doesn't reject existing rows). 2. Install @convex-dev/migrations; write a migration that backfills/transforms existing rows. 3. Run the migration; verify all rows are valid. 4. Tighten the validator (make the field required) once the backfill is complete. ## Rules - Never tighten a validator before the backfill completes — it rejects existing rows and breaks the live app. - Add new fields as optional first, migrate, then require. - Verify row counts before and after.
Ver no GitHub