What problem does it solve?
This Skill helps engineers create, verify, run, revert, and register TypeORM migrations across tenant, platform, and auth databases while enforcing project rules that prevent unsafe raw SQL and irreversible changes.
Core Features & Use Cases
- Guided Generation: Use project-specific migration:generate scripts to produce descriptive, reversible migration files for entity additions and schema changes.
- Automated Review Checklist: Verify up() and down() operations, types, defaults, indices, and foreign keys and flag common generation issues like missing down(), unexpected drops, or mixed unrelated changes.
- Deployment Workflow: Register new migrations in the correct index file, run pending migrations on staging/production with precautionary checks, and revert the last migration when needed.
- Use Case: When adding a new Invoice status column to the tenant database, generate the migration, review up/down for correctness, append the migration to the tenant index, run on staging, then run on production after verification.
Quick Start
Generate a tenant migration named AddInvoiceStatus with pnpm migration:generate:tenant AddInvoiceStatus, review the generated file for correct up and down implementations, append it to the tenant migrations index, and run it on staging for verification.