Skip to content
Skillpedia
APIs & servers (backend)9.5k · #12249

convex-migrate

What it does

This skill updates the database structure of a Convex app that already has real data. It is for builders who need to change a table without breaking the live app.

When to use it

  • ✓When you want to add a required field to a table that already has records.
  • ✓When you need to rename, change or split a field in a live app.
  • ✓When you need to fill in missing values for old records before tightening a rule.

Skill link

https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-migrate/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/openclaw/clawhub/blob/main/.agents/skills/convex-migrate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Add a required email field to my users table without breaking the users I already have.”

5 new skills a week. 1 minute to read.

How it works

The agent first makes the new field optional, installs the migration library, writes a step that fills in old records, runs it, checks the counts, and only then makes the field required.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

<!-- GENERATED from convex-agents content/capabilities/migrate.json — do not edit by hand. -->

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.

Workflow

  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.
FAQ

Why not make the field required right away?

Existing records would fail the new rule and break the live app.

How does the agent know the migration worked?

It compares row counts before and after, and checks that all rows are valid before tightening the rule.

Which library does it use?

It uses the Convex migrations library, which runs changes in batches while the app keeps working.

Details

Original description by the author

Migrate schema + backfill data on a deployed Convex app using @convex-dev/migrations.

repo: openclaw/clawhub

Popularity

GitHub stars
9.5k
Ranking position
#12249
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills