database-migrations

Plan and apply reversible PostgreSQL schema and data migrations with UP/DOWN patterns.

3|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/nassimbf/ftitos-claude-code --skill database-migrations-nassimbf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/nassimbf/ftitos-claude-code/tree/main/skills/database-migrations
Command: npx skills add https://github.com/nassimbf/ftitos-claude-code --skill database-migrations-nassimbf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database migrations are risky and can cause production downtime or data loss without proper planning. This guide provides best practices for schema changes, data migrations, and rollback strategies across PostgreSQL and common ORMs.

Core Features & Use Cases

  • Safe, reversible migrations with explicit UP and DOWN paths.
  • Zero-downtime strategies and tooling guidance for production deployments.
  • Use Case: Plan, test, and apply migrations across large datasets with predictable rollouts.

Quick Start

Create your first safe migration using the scaffolding tool and apply it to a staging database.

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 in PostgreSQL?

Zero-downtime database migrations in PostgreSQL require applying reversible schema and data changes without locking tables. This is achieved by enforcing UP/DOWN patterns and validating deployments in staging before production rollout.

What is the best way to plan reversible schema and data migrations?

The best way to plan reversible migrations is to enforce explicit UP and DOWN paths for every change. This ensures that both schema and data migrations can be safely rolled back if production deployment causes unexpected downtime or data loss.

Can I use common ORMs to apply safe database migrations across large datasets?

Yes, common ORMs can apply safe database migrations across large datasets by utilizing scaffolding tools and zero-downtime deployment strategies. This ensures predictable rollouts and minimizes risk during large-scale schema and data changes.

Why do database migrations cause production downtime and data loss?

Database migrations cause downtime and data loss when schema changes lock database tables or lack proper rollback strategies. Planning safe, reversible migrations with thorough validation before deployment minimizes these risks and prevents production failures.

How do I implement a rollback strategy for PostgreSQL schema changes?

Implement a rollback strategy for PostgreSQL schema changes by defining explicit DOWN migration paths. This zero-downtime approach ensures that any applied schema or data migration can be safely reversed if deployment issues occur.