migration-patterns

Plan and execute safe database migrations for live web apps.

161|21|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/softspark/ai-toolkit --skill migration-patterns-softspark
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-patterns
Source: https://github.com/softspark/ai-toolkit/tree/main/app/skills/migration-patterns
Command: npx skills add https://github.com/softspark/ai-toolkit --skill migration-patterns-softspark

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps engineering teams design and implement safe, scalable database migrations and zero-downtime deploys, protecting data integrity and minimizing service disruption.

Core Features & Use Cases

  • Expand-Contract migration pattern: add new columns, backfill existing data, switch reads, and deprecate old columns with minimal downtime.
  • Safe column operations & data backfills: add nullable columns, backfill data in batches, and validate consistency before cutover.
  • Cross-framework examples: Alembic, Prisma, Laravel, Django, Flyway to illustrate practical usage across popular stacks.

Quick Start

Outline a safe, zero-downtime migration plan for updating a live users table and list the concrete steps to implement.

Frequently Asked Questions about migration-patterns

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

FAQPage Schema
What is the expand-contract pattern for zero-downtime database migrations?

The expand-contract database migration pattern adds new columns, backfills existing data, switches reads, and deprecates old columns with minimal downtime to protect data integrity. It ensures safe schema changes without disrupting live web apps.

How do I plan a safe database migration for a live web app?

Plan a safe database migration by defining migration patterns, tooling examples, and validation steps. Apply expand-contract methods to add nullable columns, backfill data in batches, and validate consistency before cutover across rolling updates and continuous deployment.

Does this database migration approach work with Alembic, Prisma, and Laravel?

Yes, the database migration approach provides cross-framework examples for Alembic, Prisma, Laravel, Django, and Flyway. It illustrates practical usage across these popular stacks to implement safe column operations and data backfills.

How do I execute data backfills in batches during a schema change?

Execute data backfills during a schema change by adding nullable columns and backfilling data in batches. Validate consistency before cutover to ensure safe column operations and maintain zero-downtime during continuous deployment.

What's the best way to handle schema changes during continuous deployment?

The best way to handle schema changes during continuous deployment is using zero-downtime migration patterns like expand-contract. Apply safe column operations, batch data backfills, and validation steps to minimize service disruption and protect data integrity.