📊 Data ⚙️ Engineering Awaiting Security Review

Database Migration Planner

Plan and generate safe database migrations for PostgreSQL, MySQL, and SQLite. Creates migration files with rollback support, handles schema diffs, and flags risky operations like column renames on large tables.

This skill helps you write database migrations that won't take down production. It generates migration files for popular ORMs (Prisma, Drizzle, Knex, TypeORM), identifies potentially dangerous operations, suggests zero-downtime strategies, and creates proper rollback scripts.

database migrations postgresql mysql schema

When to use

Use when adding columns, changing types, creating indexes, or restructuring tables. Especially valuable for large tables where naive ALTER TABLE would lock the database.

Examples

Safe column addition

Add a NOT NULL column to a large table without downtime

I need to add a NOT NULL 'status' column to my users table (50M rows) in PostgreSQL — generate a safe migration

Schema diff migration

Generate migration from current vs desired schema

Compare my current Prisma schema with the desired one and generate the migration files