database-migrations

Plan and validate safe database schema migrations for multiple systems.

25|5|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/nikolanovoselec/codeflare --skill database-migrations-nikolanovoselec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/nikolanovoselec/codeflare/tree/main/preseed/agents/claude/skills/database-migrations
Command: npx skills add https://github.com/nikolanovoselec/codeflare --skill database-migrations-nikolanovoselec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides comprehensive guidelines and procedures for performing database schema changes safely, minimizing downtime and errors during migrations.

Core Features & Use Cases

  • Migration Planning and Validation: Helps define when and how to run schema and data migrations for different databases.
  • Zero-Downtime Strategies: Guides through expand-contract patterns to enable seamless production updates.
  • Use Case: A team deploying updates to a critical PostgreSQL database can follow this to add columns without locking tables or causing service disruption.

Quick Start

Use the instructions to implement a non-blocking index addition in a large PostgreSQL table.

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 use the expand-contract pattern to apply schema changes without locking tables. This approach separates schema deployment from application updates, allowing seamless production updates with minimal service disruption.

What is the expand-contract pattern for database schema changes?

The expand-contract pattern for database schema changes splits migrations into expand and contract phases to avoid downtime. It allows new schema versions to coexist temporarily with old ones, ensuring safe production deployments without breaking running applications.

How do I add a non-blocking index to a large PostgreSQL table?

Adding a non-blocking index to a large PostgreSQL table requires using concurrent index creation strategies to avoid locking. This Skill provides specific scripts and guidelines to implement non-blocking index additions safely during production deployments.

Do I need to plan data migrations separately from schema migrations?

Yes, you need to plan data migrations separately from schema migrations to ensure safe execution. This Skill helps define when and how to run each type across different databases, minimizing downtime and errors during complex deployment workflows.

What are the best practices for database migration rollbacks?

Database migration rollbacks require predefined reverse scripts and careful state tracking to safely revert schema changes. This Skill covers rollback strategies as part of its schema evolution guidelines, ensuring failed deployments can be recovered without data loss.

Can I use these migration strategies for databases other than PostgreSQL?

Yes, these migration strategies extend beyond PostgreSQL to support schema changes across multiple database systems. The guidelines cover general best practices for schema evolution and index management adaptable to various database platforms.