database-migration

Manage SQL and NoSQL database schema migrations with dry-run simulation.

Updated Feb 6, 2026
One-click install
npx skills add https://github.com/ntuan2502/piggy --skill database-migration-ntuan2502
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/ntuan2502/piggy/tree/main/.agent/skills/database-migration
Command: npx skills add https://github.com/ntuan2502/piggy --skill database-migration-ntuan2502

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the critical challenge of performing database schema changes and migrations without causing downtime or disrupting user access to the application.

Core Features & Use Cases

  • Zero-Downtime Strategy: Implements a phased approach (Expand, Migrate, Contract, Delete) for seamless database updates.
  • Schema Design: Enforces best practices like 3rd Normal Form (3NF) for robust database architecture.
  • SQL/NoSQL Support: Capable of handling migrations across different database types.
  • Dry Run Simulation: Allows for pre-execution validation to prevent errors.
  • Use Case: Migrating a production e-commerce database to a new schema version during peak hours without impacting customer orders.

Quick Start

Simulate the database migration for the latest SQL file.

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 use a phased Expand, Migrate, Contract, and Delete strategy to update schemas without disrupting user access. This approach separates deployment from schema changes to ensure seamless transitions during peak traffic.

What is the best way to test SQL migration scripts before execution?

The best way to test SQL migration scripts before execution is using a dry-run simulation. Pre-execution validation allows you to identify and prevent errors safely without applying actual changes to the target database.

Does this zero-downtime migration approach work with NoSQL databases?

Yes, the zero-downtime migration strategy works with NoSQL databases. It supports schema changes and data migrations across both SQL and NoSQL database types using the same phased approach.

How does 3NF schema design improve database migration processes?

3NF schema design improves database migrations by enforcing robust architecture and eliminating data anomalies. Normalized schemas ensure data integrity throughout the phased migration process, reducing the risk of corruption during expansion and contraction.

Can I migrate a production e-commerce database during peak hours without downtime?

Yes, you can migrate a production e-commerce database during peak hours without downtime. The phased zero-downtime strategy specifically handles high-traffic scenarios, ensuring customer orders remain unaffected while schema updates are applied.

What are the limitations of the expand and contract migration pattern?

The expand and contract migration pattern requires careful application coordination across multiple deployment phases. Limitations include increased code complexity and the need to maintain backward compatibility throughout the entire migration lifecycle.