migration-safety

Design safe database migrations with rollback plans for PostgreSQL and MySQL.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/marquesfelip/agents-and-skills --skill migration-safety-marquesfelip
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-safety
Source: https://github.com/marquesfelip/agents-and-skills/tree/main/skills/migration-safety
Command: npx skills add https://github.com/marquesfelip/agents-and-skills --skill migration-safety-marquesfelip

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams design safe database migrations, assess risk, and implement robust rollback plans to prevent data loss and downtime.

Core Features & Use Cases

  • Classify migrations by risk (Safe, Risky, Destructive) and provide best-practice guidance.
  • Design rollback plans and validation steps that can be executed in staging and production environments.
  • Provide safe migration patterns for common operations (adding nullable columns with backfills, zero-downtime rename strategies, and safe column type changes).

Quick Start

Plan a safe PostgreSQL migration with a backfill strategy and a tested rollback.

Frequently Asked Questions about migration-safety

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

FAQPage Schema
How do I design a safe database migration with a rollback plan?

Zero-downtime database migrations use patterns like adding nullable columns with staged backfills and zero-downtime table rename strategies. These safe operation patterns decouple schema deployment from application code changes to maintain continuous availability.

How do I execute a destructive database migration safely?

Destructive database migrations require strict risk classification and staged rollouts with CI validation. You must prepare and test a rollback script in staging environments to ensure data can be restored if the production deployment fails.

Can I use this migration safety approach with MySQL and PostgreSQL?

Yes, this migration safety approach supports schema changes, backfills, and rollback validation across PostgreSQL, MySQL, and other database engines. It provides engine-specific tooling guidance for safe operation patterns and versioning practices.

What is a backfill strategy in database schema changes?

A backfill strategy in database schema changes populates new nullable columns with data incrementally after deployment. This safe migration pattern avoids locking tables during large updates and ensures zero-downtime during structural transitions.

When should I classify a database migration as risky or destructive?

You should classify a database migration as risky or destructive when it involves dropping columns, altering data types, or deleting records. These operations require explicit rollback scripting and CI validation to prevent irreversible data loss and downtime.