db-migration-strategy

Coordinate production schema migrations with compatibility windows and rollback semantics.

7|Updated Feb 14, 2026
One-click install
npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill db-migration-strategy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migration-strategy
Source: https://github.com/KentoShimizu/sw-agent-skills/tree/main/skills/db-migration-strategy
Command: npx skills add https://github.com/KentoShimizu/sw-agent-skills --skill db-migration-strategy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinate safe, production-grade schema migrations through coordinated changes, compatibility windows, and rollback-safe rollout strategies.

Core Features & Use Cases

  • Define migration patterns: expand-contract, dual-write, shadow-read, or phased cutover to minimize downtime.
  • Plan compatibility windows and multi-version rollout to keep services online during migrations.
  • Establish rollback semantics and data reconciliation steps to recover from failures quickly.

Quick Start

Define your migration plan by outlining change classes, compatibility windows, and rollback criteria before deploying.

Frequently Asked Questions about db-migration-strategy

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

FAQPage Schema
What is the best way to plan safe schema changes in production?

Schema migration patterns like expand-contract, dual-write, shadow-read, and phased cutover minimize downtime during production rollouts. Expand-contract separates changes into backward-compatible stages, while dual-write and shadow-read validate data across coexisting service versions before cutover.

How do I coordinate database backfills during a multi-version service rollout?

Coordinate database backfills during a multi-version rollout by defining compatibility windows where old and new service versions coexist. Use shadow-reads or dual-writes to populate and validate data before completing the phased cutover.

Can I use an expand-contract pattern to avoid downtime during schema migrations?

Yes, the expand-contract pattern avoids downtime during schema migrations by expanding the schema first, deploying code to use it, and contracting later. This keeps multiple service versions compatible throughout the rollout window.

How do I define rollback semantics for a failed production schema migration?

Define rollback semantics for a failed production schema migration by documenting data reconciliation steps and criteria before deploying. Plan the compatibility window so you can revert to the prior service version without losing data integrity.

When do I need a shadow-read strategy for database migrations?

You need a shadow-read strategy for database migrations when validating a new schema or data path against production traffic without impacting users. It verifies data integrity during the compatibility window before executing a full phased cutover.

What are the limitations of dual-write migrations for production schema changes?

Dual-write migrations for production schema changes require careful handling of consistency and reconciliation if the rollout fails. You must maintain strict compatibility windows and manage the complexity of writing to both old and new schema versions simultaneously.