database-migration-versioning-expert

Solid

Expert guide for database migrations: schema versioning, zero-downtime migrations, backward-compatible changes, data backfill, and rollback strategies / Panduan ahli migrasi database.

API & Backend 46 stars 9 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
56
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Database Migration & Versioning Expert [English](#english) | [Bahasa Indonesia](#bahasa-indonesia) --- <a name="english"></a> ## English ### Description A specialized skill focused strictly on the lifecycle of database schemas in production environments. While `database-orm-expert` handles queries and types, this skill covers the DevOps aspect of databases: zero-downtime schema migrations, backward-compatible release cycles, stateful data backfills, rollback mechanisms, and schema versioning strategies. ### Trigger Conditions - When modifying an existing production database schema. - When planning a deployment that involves database changes (blue-green, canary). - When resolving merge conflicts in migration files (e.g., Prisma, Drizzle, Alembic). - When designing backfill scripts for massive data migrations. ### Core Architectural Guidelines #### 1. Zero-Downtime Migration Pattern (Expand and Contract) Never make breaking changes in a single deployment. Use the "Expand and Contract" pattern (Parallel Change): - **Phase 1 (Expand)**: Add the new schema element (column, table) without removing the old one. Deploy the database change. - **Phase 2 (Migrate)**: Update application code to write to *both* old and new elements, and read from the new element (with fallback). Deploy code. - **Phase 3 (Backfill)**: Run a background script to backfill data from the old element to the new element for older records. - **Phase 4 (Contract)**: Remove the old application code that wr...

Details

Author
roedyrustam
Repository
roedyrustam/vibes-plug
Created
3 months ago
Last Updated
3 days ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category