Skip to content

Database Migration Manager

Caution

Plan and execute database schema migrations with rollback support, data preservation, and zero-downtime strategies.

By agent-skills 5,640 v1.4.0 Updated 2026-03-10

Install

Claude Code

claude install database-migration

About This Skill

Overview

Database Migration Manager handles the complexity of evolving your database schema over time. It generates migration files, plans safe execution strategies, and ensures data integrity throughout the process.

Key Features

  • Migration Generation: Creates timestamped migration files with both up and down scripts. Supports SQL migrations and ORM-specific formats (Prisma, Knex, Drizzle, Alembic).
  • Breaking Change Detection: Identifies migrations that could break existing queries or application code, such as column renames, type changes, or NOT NULL additions on populated tables.
  • Zero-Downtime Strategies: For production databases, suggests multi-step migration patterns (expand-contract) that avoid locking tables or breaking running applications.
  • Rollback Planning: Every migration comes with a tested rollback script. Complex migrations include data preservation steps to ensure no information is lost during rollback.

Supported Databases

PostgreSQL, MySQL, SQLite, and SQL Server. ORM support includes Prisma, Drizzle, Knex, TypeORM, SQLAlchemy, and Django ORM. Each generates idiomatic migration files for the target platform.

Safety Measures

All destructive operations require double confirmation. The skill checks for foreign key dependencies before DROP operations and warns about data loss. A dry-run mode shows exactly what SQL will execute.

Use Cases

  • Generate migration files for schema changes with up/down scripts
  • Plan zero-downtime migration strategies for production databases
  • Detect breaking schema changes and suggest safe migration paths
  • Create data backfill scripts for new columns with default values

Pros & Cons

Pros

  • + Prevents data loss with comprehensive rollback planning
  • + Zero-downtime strategies keep production running during migrations
  • + Supports all major databases and ORMs
  • + Breaking change detection catches issues before deployment

Cons

  • - Complex data transformations may require manual SQL beyond generated scripts
  • - Performance impact of large-table migrations needs manual estimation

Related AI Tools

Related Skills

Stay Updated on Agent Skills

Get weekly curated skills + safety alerts

每周精选 Skills + 安全预警