migration-advisor

Advise on safe database schema and data migrations across PostgreSQL, MySQL, and ORMs.

1|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/kangnam7654/ai-config-sync --skill migration-advisor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-advisor
Source: https://github.com/kangnam7654/ai-config-sync/tree/main/claude-code/skills/migration-advisor
Command: npx skills add https://github.com/kangnam7654/ai-config-sync --skill migration-advisor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance and best practices for performing safe, reversible database schema and data migrations across various database systems and ORMs, minimizing downtime and preventing data loss.

Core Features & Use Cases

  • Schema Change Best Practices: Learn how to safely add/remove columns, create indexes, and rename tables without locking production databases.
  • Data Migration Strategies: Implement batch processing and transactional safety for large data transformations.
  • Zero-Downtime Deployments: Understand the expand-contract pattern for critical production changes.
  • ORM Integration: Get specific advice for Prisma, Drizzle, Django, TypeORM, and golang-migrate.

Quick Start

Provide guidance on how to safely add a new nullable column to a PostgreSQL table named 'users'.

Frequently Asked Questions about migration-advisor

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

FAQPage Schema
How do I perform a zero-downtime database migration in PostgreSQL?

Zero-downtime database migration uses the expand-contract pattern to apply schema changes without locking production tables. This approach separates changes into backward-compatible phases, allowing new and old application versions to run simultaneously during deployment.

What is the best way to safely add a nullable column to a PostgreSQL table?

Safely adding a nullable column in PostgreSQL requires issuing an ALTER TABLE statement with a default null value. This avoids table rewrites and long locks, allowing the database to accept the schema change immediately without interrupting ongoing read and write operations.

Does Prisma support safe rollback strategies for production schema changes?

Prisma supports safe rollback strategies through its migration tooling by allowing you to define and apply reversible SQL schemas. You can manually craft down-migrations to restore previous states, ensuring production deployments remain reversible if unexpected issues occur.

How do I handle large data migrations without causing database locks?

Large data migrations require batch processing and transactional safety to avoid long database locks. By updating data in smaller sequential chunks within individual transactions, you minimize contention and prevent production downtime during extensive data transformations.

Can I use the expand-contract pattern with Django ORM migrations?

Django ORM supports the expand-contract pattern by generating custom migration files that apply backward-compatible schema changes. You deploy additive changes first, update the application layer, and then schedule a subsequent migration to remove deprecated columns.

Why does creating an index lock my PostgreSQL database during migration?

Creating an index locks your PostgreSQL database because a standard CREATE INDEX operation blocks concurrent writes to the target table. To prevent this, use CREATE INDEX CONCURRENTLY for zero-downtime deployments, allowing writes while the index builds.