database-migrations
Installation
SKILL.md
Database Migrations
Overview
Database migrations manage schema changes in a controlled, versioned manner, enabling safe evolution of database structure. This skill should be invoked when evolving database schema, managing team database development, or rolling back problematic changes.
Core Principles
- Version Control: Store migrations in version control alongside code
- Idempotency: Migrations should be safe to run multiple times
- Forward and Backward: Support both applying and rolling back changes
- Small Batches: Prefer small, focused migrations over large ones
Preparation Checklist
- Choose migration tool (Alembic, Prisma, TypeORM, Flyway)
- Initialize migration system in project
- Set up migration tracking table
- Define naming convention for migrations