database-migrations

Plan reversible database schema changes for PostgreSQL, MySQL, and common ORMs.

Updated Mar 4, 2026
One-click install
npx skills add https://github.com/Fabio29T/Everything-Claude --skill database-migrations-fabio29t
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/Fabio29T/Everything-Claude/tree/main/docs/zh-CN/skills/database-migrations
Command: npx skills add https://github.com/Fabio29T/Everything-Claude --skill database-migrations-fabio29t

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill ensures safe, reversible database schema changes and data migrations, preventing data loss and downtime during deployments.

Core Features & Use Cases

  • Schema Evolution: Manage database table, column, and index changes reliably.
  • Data Migration: Safely move or transform existing data as part of schema updates.
  • Zero-Downtime Deployments: Implement strategies for applying changes without interrupting service.
  • Rollback Planning: Ensure all changes can be safely reverted if necessary.
  • Use Case: When adding a new is_active boolean column to your users table, this skill guides you through adding it as nullable, backfilling default values, and then making it non-nullable without locking the table.

Quick Start

Use the database-migrations skill to safely add a new nullable column named 'avatar_url' of type text to the 'users' table in PostgreSQL.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I safely add a non-nullable column to a PostgreSQL table without locking it?

To safely add a non-nullable column to PostgreSQL, apply a multi-step migration: add the column as nullable, backfill the default values, and then enforce the non-null constraint to avoid table locks and downtime.

What is the best way to handle data migration and schema changes during zero-downtime deployments?

Zero-downtime deployments require splitting schema changes and data migrations into backward-compatible steps, ensuring both old and new application versions can operate safely while the database updates are applied.

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

Yes, these database migration best practices work with common ORMs including Prisma, Django, TypeORM, Drizzle, and golang-migrate, guiding reliable schema evolution and rollback planning across these frameworks.

How do I plan and execute rollbacks for database schema modifications?

Rollback planning ensures all database schema modifications and data migrations are designed to be reversible, providing safe reversion paths to previous states if a deployment fails or causes unexpected issues.

When do I need to use backward-compatible database migrations?

You need backward-compatible database migrations when applying schema changes to a live production environment, ensuring ongoing application operations are not interrupted by data loss or table locking.

Why does adding a database column with a default value lock my table and how do I avoid it?

Adding a column with a default value can lock database tables during the schema update; avoid this by separating the addition, backfilling data, and applying constraints across distinct migration steps.