database-migration-create

cpa03's avatarfrom cpa03

Safely creates database migrations

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

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.
namedatabase-migration-create
descriptionSafely creates database migrations

Procedure

  1. Analyze the schema change requirement.
  2. Write the SQL migration file (UP and DOWN if needed).
  3. Review for locking issues or data loss risks.
  4. Update ORM definitions/types.
  5. Apply migration locally to verify.