database-migration

Solid

Create database migration with schema changes and rollback. Auto-invoke when user says "create migration", "add table", "modify schema", or "change database".

API & Backend 232 stars 12 forks Updated today

Install

View on GitHub

Quality Score: 82/100

Stars 20%
79
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
0
Description 5%
100

Skill Content

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

Details

Author
alekspetrov
Repository
alekspetrov/navigator
Created
11 months ago
Last Updated
today
Language
Python
License
None

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category