What problem does it solve?
The Convex migrations skill provides a structured framework for authoring versioned, reversible, and tested data migrations in services/platform/convex/migrations. It ensures migrations are triggered by schema changes that affect stored data, and enforces safety checks like idempotence, reversible down migrations, and CI-driven validation (migrations:check). It emphasizes proper registration in ALL_META and DB_MIGRATIONS and outlines how tests guard against regressions and data loss.
Core Features & Use Cases
- Versioned migrations with explicit meta and slug, enabling traceability and rollbacks.
- Idempotent up/down handlers with optional snapshot strategies to rebuild lost data.
- Mandatory tests that validate applying then reversing migrations, and ledger state consistency.
- Dual registration (ALL_META for meta, DB_MIGRATIONS for runnable migrations) to ensure CI and deployment safety.
- Guidance on patterns for db and node migrations, including example structures and test directories.
Quick Start
Define a new migration version with a readable slug, implement up/down handlers, and validate it in CI before deployment.