migration-agent

Generate reversible Rails database migrations for PostgreSQL schema changes.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/reckerswartz/resume_builder --skill migration-agent-reckerswartz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-agent
Source: https://github.com/reckerswartz/resume_builder/tree/main/.windsurf/skills/migration-agent
Command: npx skills add https://github.com/reckerswartz/resume_builder --skill migration-agent-reckerswartz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Creates safe, reversible Rails migrations to modify schemas without downtime, ensuring data integrity and rollback capability.

Core Features & Use Cases

  • Generates up/down migrations with proper reversal logic.
  • Supports concurrent index creation and deferrable constraints for zero-downtime deployments.
  • Applies to table creation, column alterations, constraint changes, and index updates in PostgreSQL-backed Rails apps.

Quick Start

Generate a new migration with bin/rails generate migration <Name> and apply it with bin/rails db:migrate.

Frequently Asked Questions about migration-agent

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

FAQPage Schema
How do I create zero-downtime Rails migrations for PostgreSQL?

Zero-downtime Rails migrations are created by automating reversible up/down methods, enforcing concurrent index creation, and applying production-safe schema changes to PostgreSQL databases. This ensures data integrity and rollback capability without service interruptions.

What makes a Rails database migration reversible?

A reversible Rails database migration includes properly defined up and down methods that apply and reverse schema changes like table creation, column alterations, and constraint updates. This logic guarantees that any database modification can be safely rolled back.

How do I add indexes concurrently in ActiveRecord migrations?

Add indexes concurrently in ActiveRecord migrations by generating schema changes that enforce concurrent index creation. This prevents locking issues during zero-downtime deployments and supports deferrable constraints in PostgreSQL-backed Rails apps.

Can I modify PostgreSQL constraints without downtime in Rails?

You can modify PostgreSQL constraints without downtime in Rails by generating migrations that support deferrable constraints and concurrent index creation. This production-safe change management approach ensures data integrity while maintaining application availability.

What is the best way to manage schema changes in a Rails app?

The best way to manage schema changes in a Rails app is to automate safe, reversible migrations for table creation, column alterations, and constraint changes. Enforcing production-safe change management with concurrent operations prevents downtime and data loss.

When do I need concurrent index creation in PostgreSQL migrations?

Concurrent index creation in PostgreSQL migrations is needed during zero-downtime deployments to avoid locking the database table. It allows safe schema changes and index updates in production environments while the application remains available.