Zero-Downtime Database Migrations
Implements safe, non-blocking database schema changes using the expand-contract pattern and online migration tools.
This skill equips Claude with production-ready patterns for performing complex database migrations without service interruptions. It focuses on the expand-contract (parallel-schema) pattern, allowing multiple versions of an application to run simultaneously during a transition. By utilizing tools like pgroll and PostgreSQL-specific techniques such as concurrent indexing and 'NOT VALID' constraints, this skill ensures that tasks like renaming columns, adding constraints, or re-indexing large tables never cause table locks or downtime in high-traffic environments.
Características Principales
01Non-blocking index creation using PostgreSQL CONCURRENTLY patterns
02Safe constraint management using NOT VALID and separate validation phases
0369 GitHub stars
04Batch-based data backfilling strategies to prevent transaction log bloat
05Automated migration orchestration using pgroll for versioned database schemas
06Expand-Contract pattern implementation for safe column renames and deletions
Casos de Uso
01Renaming or removing database columns in a live production environment without breaking the API
02Creating indexes on multi-million row tables while maintaining full read/write availability
03Adding NOT NULL constraints to existing columns without locking the table for a full scan