database-migration

Plan zero-downtime database migrations with rollback procedures for Sequelize, TypeORM, and Prisma.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Maykesantos98/Fiap-Totvs --skill database-migration-maykesantos98
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/Maykesantos98/Fiap-Totvs/tree/main/.claude/skills/database-migration
Command: npx skills add https://github.com/Maykesantos98/Fiap-Totvs --skill database-migration-maykesantos98

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database schema and data changes often break applications, cause downtime, or leave teams without a reliable rollback path when something goes wrong.

Core Features & Use Cases

  • Cross-ORM migration patterns: Guides migration approaches for Sequelize, TypeORM, and Prisma, including how to define up/down behavior.
  • Safe schema transformations: Covers adding columns with defaults, renaming via multi-step compatibility strategies, and changing column types using intermediate columns and backfills.
  • Data transformation and integrity: Provides patterns for complex record reshaping and for reversing transformations during rollback.
  • Rollback strategies: Includes transaction-based rollback and checkpoint/backup-table rollback to recover from migration verification failures.
  • Zero-downtime deployments: Implements blue-green and backward-compatible rollout phases (add new columns, backfill, dual-write/read, then remove old columns).

Use this Skill when you must refactor a production database schema (e.g., renaming fields, changing data types, moving data formats) while keeping the system working and ensuring you can revert safely.

Quick Start

Use the database-migration skill when planning a schema refactor and ask it to produce a zero-downtime migration plan with a rollback procedure for your specific ORM and database change.

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 when renaming fields or changing column types?

Zero downtime database migrations use backward-compatible rollout phases: add new columns, backfill data, dual-write and dual-read, then remove old columns. This keeps applications working throughout the schema transformation.

What is the safest rollback strategy for production database schema migrations?

A safe rollback strategy uses transaction-based rollback for immediate failures and checkpoint or backup-table rollback for migration verification failures. This ensures reliable restoration of schema and data integrity.

Does this database migration approach support Sequelize, TypeORM, and Prisma ORM frameworks?

Yes, cross-ORM migration patterns guide approaches for Sequelize, TypeORM, and Prisma, including how to define up and down migration behavior for safe schema transformations and recoverability.

How do I backfill data safely when changing column types in a production database?

Safe column type changes use intermediate columns and backfills to transform stored data. This multi-step compatibility strategy ensures data integrity while maintaining application availability.

What are the limitations of zero downtime deployments for complex data transformations?

Complex data transformations require reversing transformations during rollback, which may be difficult for record reshaping. Checkpoint and backup-table strategies are needed to recover from migration verification failures.

Can I reverse complex data transformations during a database migration rollback?

Yes, data transformation patterns include reversing transformations during rollback using transaction-based or checkpoint strategies to restore original record formats and ensure data integrity.