migration-agent

Generates reversible PostgreSQL migrations for Rails ActiveRecord applications.

Updated Feb 8, 2026
One-click install
npx skills add https://github.com/mlbright/notes --skill migration-agent-mlbright
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-agent
Source: https://github.com/mlbright/notes/tree/main/.github/skills/migration-agent
Command: npx skills add https://github.com/mlbright/notes --skill migration-agent-mlbright

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that database schema changes in Rails applications are performed safely, reversibly, and with production performance in mind, preventing downtime and data loss.

Core Features & Use Cases

  • Safe Schema Changes: Generates migrations that are reversible and avoid locking tables on large datasets.
  • Production Optimization: Implements strategies like concurrent indexes and multi-step column updates for zero-downtime deployments.
  • Use Case: When adding a new email column to a users table with millions of records, this Skill will generate a migration that adds the column concurrently and safely, ensuring the application remains available throughout the process.

Quick Start

Generate a new migration to add a status column of type string to the orders table.

Frequently Asked Questions about migration-agent

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

FAQPage Schema
How do I add a column to a large PostgreSQL table in Rails without locking it?

To add a column without locking a large PostgreSQL table, you need safe Rails migrations that use concurrent indexes and multi-step updates for zero-downtime deployments. This approach prevents table locks and keeps your application available during schema changes on massive datasets.

What is a reversible Rails migration and why is it needed for production databases?

A reversible Rails migration allows schema changes to be safely rolled back, preventing data loss and downtime in production. It is needed because production databases require zero-downtime strategies and guaranteed rollback paths if a deployment introduces data integrity issues.

How do I generate zero-downtime database migrations for ActiveRecord with PostgreSQL?

You generate zero-downtime ActiveRecord migrations by applying PostgreSQL-specific strategies like concurrent index creation and multi-step column updates. This ensures complex schema modifications and data integrity constraints are applied without locking tables or disrupting large datasets.

Can I use this approach for complex data integrity constraints on large datasets?

Yes, you can use this approach for complex data integrity constraints on large datasets. The generated migrations handle schema modifications and enforce constraints using production-optimized strategies that maintain zero-downtime and prevent locking issues on massive PostgreSQL tables.

What is the best way to handle schema modifications in Rails without causing downtime?

The best way to handle schema modifications without causing downtime is using production-optimized Rails migrations. They implement concurrent indexes and multi-step column updates, ensuring zero-downtime deployments and preventing table locks when modifying large PostgreSQL datasets.