← ClaudeAtlas

database-migrationlisted

Create database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify schema", or "change database".
alekspetrov/navigator · ★ 189 · API & Backend · score 80
Install: claude install-skill alekspetrov/navigator
# Database Migration Generator Generate database migrations with rollback capability for schema changes, with built-in ToM verification for safe database operations. > **Implementation note**: This skill uses direct `Write()` calls with inline templates (see Steps 3–4 and "Schema Change Templates" section below). Unlike `frontend-component` and `backend-endpoint`, there are no Python helper functions — the skill is prose-driven by design, since migration generation is highly schema-specific and benefits from inline framework templates. Future work (tracked for v6.6.0) may extract a timestamp generator and per-framework templates. ## When to Invoke Auto-invoke when user mentions: - "Create migration" - "Add table" - "Modify schema" - "Change database" - "Database migration for [change]" - "Add column to [table]" - "Rename [table/column]" ## What This Does 1. Detects migration framework (Knex, Prisma, TypeORM, raw SQL) 2. Gathers migration requirements 3. **Verifies understanding before generating** (ToM checkpoint - critical for DB changes) 4. Generates migration file with timestamp 5. Creates schema change (up migration) 6. Creates rollback (down migration) 7. Validates migration safety 8. Shows migration summary ## Execution Steps ### Step 0: Check Existing Patterns (Phase 0) Before detecting the framework, query the knowledge graph for what we already know about database work in this project. For migrations — the highest-stakes execution path — Phase 0 is especiall