database-migration-create
Safely creates database migrations
When & Why to Use This Skill
This Claude skill automates the end-to-end process of creating safe database migrations. It streamlines schema evolution by analyzing requirements, generating reversible SQL scripts (UP/DOWN), and performing critical safety reviews to prevent data loss or table-locking issues. By integrating ORM synchronization and local verification, it ensures high-integrity database management for modern software development workflows.
Use Cases
- Schema Evolution: Safely adding, modifying, or dropping columns and tables in production databases without downtime.
- Risk Mitigation: Automatically identifying and alerting developers to potentially destructive operations or long-running locks during the migration design phase.
- ORM Synchronization: Ensuring that application-level ORM definitions and TypeScript/Python types remain perfectly aligned with the physical database schema.
- Version Control Integration: Generating standardized, reversible SQL migration files that follow team best practices for database versioning.
| name | database-migration-create |
|---|---|
| description | Safely creates database migrations |
Procedure
- Analyze the schema change requirement.
- Write the SQL migration file (UP and DOWN if needed).
- Review for locking issues or data loss risks.
- Update ORM definitions/types.
- Apply migration locally to verify.