database-migration

Migrate database schemas and data across Sequelize, TypeORM, and Prisma.

322|45|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Microck/ordinary-claude-skills --skill database-migration-microck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/Microck/ordinary-claude-skills/tree/main/database-migration
Command: npx skills add https://github.com/Microck/ordinary-claude-skills --skill database-migration-microck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Executing database migrations, especially schema changes and data transformations, without downtime or data loss is a complex and high-risk operation. This Skill provides patterns and strategies for seamless database evolution across various ORMs and platforms.

Core Features & Use Cases

  • ORM-Agnostic Migrations: Master migration techniques for popular ORMs like Sequelize, TypeORM, and Prisma, ensuring consistent database updates.
  • Zero-Downtime Strategies: Implement advanced patterns like blue-green deployments and multi-step column changes to avoid service interruptions.
  • Robust Rollback Procedures: Design and execute transaction-based or checkpoint-based rollbacks to safely revert changes if issues arise.
  • Use Case: When you need to rename a critical column in a production database table, use this skill to implement a zero-downtime migration strategy that involves adding a new column, copying data, updating the application, and then safely removing the old column, all without impacting users.

Quick Start

Generate a Sequelize migration to add a 'status' column to the 'users' table with a default value of 'active' and ensure it's nullable.

Frequently Asked Questions about database-migration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform zero-downtime database migrations in production?

Zero-downtime database migrations avoid service interruption by deploying schema changes in stages: add new columns alongside old ones, migrate data gradually, update application code, then remove deprecated columns. This approach works across ORMs like Sequelize, TypeORM, and Prisma, ensuring users experience no downtime during the transition.

Can I migrate databases between different ORMs like Sequelize, TypeORM, and Prisma?

Yes, you can migrate between ORMs by mapping schema and data transformation strategies to each platform's migration syntax. The process involves extracting data, transforming it according to target schema requirements, and executing ORM-specific migrations, enabling seamless transitions while maintaining data integrity.

What's the best way to rollback a failed database migration?

Implement transaction-based or checkpoint-based rollback procedures that revert schema and data changes if issues arise. Database migrations should include explicit rollback logic—reverse scripts that undo additions, restorations, and deletions—enabling quick recovery without manual intervention.

How do I rename a database column without downtime?

Rename columns safely by adding a new column, copying existing data to it, updating application code to use the new column name, then dropping the old column. This multi-step approach eliminates downtime because the application switches to the new column before the old one is removed.

Does my ORM support schema transformations and data migrations?

Popular ORMs including Sequelize, TypeORM, and Prisma support schema transformations through migration files. Each ORM provides mechanisms to define schema changes and execute data transformations, though the syntax and capabilities vary; consult your ORM's migration documentation for specific transformation support.

What precautions should I take before running database migrations in production?

Always test migrations in a staging environment matching production schema and data volume. Create backups before execution, validate rollback procedures, schedule migrations during low-traffic windows, and monitor application logs post-deployment for errors. These safeguards catch issues before they impact users.