database-migrations

Plan zero-downtime schema and data migrations across PostgreSQL and MySQL.

2|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/JaimeJunr/context-mode --skill database-migrations-jaimejunr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/JaimeJunr/context-mode/tree/main/.claude/skills/database-migrations
Command: npx skills add https://github.com/JaimeJunr/context-mode --skill database-migrations-jaimejunr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe, reliable database migrations that minimize downtime across multi-database environments. This Skill provides best practices for schema changes, data migrations, and zero-downtime deployment strategies across PostgreSQL, MySQL, and popular ORMs (Prisma, Drizzle, Kysely, Django, TypeORM, golang-migrate).

Core Features & Use Cases

  • Define and enforce safe migration patterns (expand-contract strategy, separate schema and data migrations, non-blocking operations).
  • Provide guidance for multiple ORMs and tooling (Prisma, Drizzle, Kysely, Django, TypeORM, go-migrate) and cross-database considerations.
  • Plan and execute migrations with robust rollback plans, testing against representative datasets, and zero-downtime rollout.

Quick Start

Assess your project and implement a zero-downtime migration plan using explicit UP/DOWN migrations across PostgreSQL, MySQL, and your chosen ORM tooling.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I perform zero-downtime database migrations across PostgreSQL and MySQL?

Perform zero-downtime database migrations by applying the expand-contract strategy, separating schema and data migrations, and using non-blocking operations across PostgreSQL and MySQL. This approach maintains application availability while schema changes are applied.

What is the expand-contract strategy for safe schema changes?

The expand-contract strategy for schema changes incrementally broadens the database structure before removing old parts. It separates schema and data migrations to deploy non-blocking updates safely, enabling reliable rollback plans.

Does this database migration approach work with Prisma, Drizzle, and Django ORMs?

Yes, this database migration approach works with Prisma, Drizzle, Kysely, Django, TypeORM, and golang-migrate. It provides explicit UP and DOWN handling alongside tooling patterns tailored for these specific ORMs.

How do I handle rollbacks when a database migration fails?

Handle rollbacks when a database migration fails by defining explicit UP and DOWN migrations and testing against representative datasets. Robust rollback plans ensure schema changes and data migrations revert safely without downtime.

What is the best way to separate data migrations from schema changes?

The best way to separate data migrations from schema changes is to define distinct migration safety guidelines and explicit UP and DOWN workflows. This isolation prevents locking conflicts and enables zero-downtime rollouts across multi-DB environments.

When should I avoid non-blocking operations during database migrations?

Avoid non-blocking operations during database migrations when executing complex data backfills that require strict transactional consistency. In these cases, separating schema and data migrations ensures safe execution without risking deployment integrity.