database-migrations

Plan safe database schema and data migrations for production systems.

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/mostafa-ismail-2004/codex-plugin --skill database-migrations-mostafa-ismail-2004
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/mostafa-ismail-2004/codex-plugin/tree/main/skills/database-migrations
Command: npx skills add https://github.com/mostafa-ismail-2004/codex-plugin --skill database-migrations-mostafa-ismail-2004

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you change databases safely without breaking production, avoiding table locks, failed deploys, and hard-to-reverse schema mistakes.

Core Features & Use Cases

  • Safe schema evolution: Add, alter, rename, and remove columns or indexes using production-friendly patterns.
  • Data migration planning: Separate backfills and transforms from schema changes so each step can be tested and rolled out independently.
  • Zero-downtime deployment guidance: Use expand-contract workflows to support PostgreSQL, MySQL, and common migration tools like Prisma, Drizzle, Kysely, Django, and golang-migrate.
  • Use case: A team needs to add a new required field to a large user table, backfill existing rows, deploy application changes, and drop the old field later without interrupting traffic.

Quick Start

Ask for a safe migration plan for your schema change, including rollout steps, backfill strategy, and rollback guidance.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I add a required column to a large PostgreSQL table without downtime?

To add a required column without downtime, use an expand-contract sequence: add the nullable column, backfill data separately, update application code, then enforce constraints later. This prevents table locks during schema changes.

What is the best way to backfill data during a zero-downtime database migration?

The best way to backfill data is to separate backfills from schema changes entirely. Decouple the data transform into an independent step so it can be tested, rolled out, and reversed without blocking deploys or interrupting traffic.

Does this approach work with Prisma and Django ORM migration workflows?

Yes, this zero-downtime approach works with Prisma, Django, Drizzle, Kysely, and golang-migrate. It applies forward-only deployment patterns and concurrency-safe indexing across PostgreSQL and MySQL to ensure safe schema evolution.

How do I drop a column safely in MySQL without breaking running applications?

To drop a column safely, follow an expand-contract pattern: stop writing to the old column in application code, deploy the update, and drop the column only after confirming no traffic depends on it. This avoids failed deploys and hard-to-reverse schema mistakes.

Why do I need forward-only deployment patterns for schema changes?

Forward-only deployment patterns are required to ensure each migration step is independently testable and reversible. They prevent failed deploys by ensuring new application code tolerates both old and new database states during the expand-contract rollout.