Install any skill in seconds. Free to start, no credit card required.
Get Started Free →waynesutton/convex-migrations
Schema migration strategies for evolving applications including adding new fields, backfilling data, removing deprecated fields, index migrations, and zero-downtime migration patterns
Passed 20 of 23 test cases with the skill, and 13 of 23 without it.
and 6 more in the full report
7 fixed13 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
This benchmark measured an earlier version of the skill.
A newer attempt on gemini-3.6-flash on 10/3/2026 did not produce a publishable comparison (not comparable). The snapshot above is the previously measured run.
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write an internal query 'hasMigrationRun' in Convex that checks the 'migrations' table by name to determine if a specific named migration has already completed.
| Checked | Without skill | With skill |
|---|---|---|
| Queries migrations table using .withIndex with name by_name | Passed | Passed |
| Returns true when migration status equals completed | Missed | Passed |
The instructions your model reads when the skill loads.
Produces a schema change plus a batched backfill that keeps every deploy green. The one rule: the schema must describe the documents that exist right now, not the documents you want. Change the data first, then tighten the validator.
Convex has no migration files or migrate command. npx convex dev pushes the schema and validates every existing document against it. Existing data is never transformed for you.
npx convex dev fails with Schema validation failed after a schema editFor step by step recipes (rename, change type, split, merge, add required, remove) open references/migration-patterns.md. For installing and running @convex-dev/migrations open references/migrations-component.md.
Every migration follows the same six steps. Skipping one is how deploys break.
convex/schema.ts (or add the new field as v.optional).npx convex dev. Update readers to handle undefined and writers to set the new shape.v.string() instead of v.optional(v.string()), or drop the old field).Steps 1 and 2 must ship before step 3 starts. Otherwise new writes keep producing old shaped documents while the backfill runs.
One internalMutation that pages through the table with paginate, patches only documents that still need it, then reschedules itself with the continue cursor. Each batch is its own transaction, so a large table never hits the per function limit.
// convex/migrations.ts
import { internalMutation } from "./_generated/server";
import { internal } from "./_generated/api";
import { v } from "convex/values";
const BATCH_SIZE = 100;
test cases passed, vs 13 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.