Database Migration Best Practices

•
151
•

Implements safe database schema changes, data migrations, and zero-downtime deployments across multiple SQL dialects and ORMs.

This skill provides comprehensive, production-ready guidance for managing database schema and data changes without risking data loss or system downtime. It covers essential patterns like the expand-contract strategy, concurrent indexing for PostgreSQL, and specific workflows for popular tools including Prisma, Drizzle, Django, and golang-migrate. By following these standardized principles and safety checklists, developers can ensure that migrations are immutable, reversible, and tested against production-scale data before deployment.

主要功能

01Large-scale data backfill strategies using batching and progress tracking
02Zero-downtime expand-contract migration patterns
03Safety checklists to prevent common production migration anti-patterns
04Tool-specific workflows for Prisma, Drizzle, Kysely, Django, and Go
05Non-blocking index creation and column addition for PostgreSQL
06151 GitHub stars

使用场景

01Altering large production tables without locking writes or causing downtime
02Standardizing migration workflows for teams using diverse ORMs and migration tools
03Refactoring database schemas through safe multi-step renaming and removal processes