rails-migrations

Generate and manage Rails database migrations with reversible up/down patterns.

3|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill rails-migrations-bastos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-migrations
Source: https://github.com/bastos/ruby-plugin-marketplace/tree/main/plugins/ruby-on-rails/skills/rails-migrations
Command: npx skills add https://github.com/bastos/ruby-plugin-marketplace --skill rails-migrations-bastos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Rails migrations are essential but can be error-prone and hard to manage across environments. This skill provides structured guidance for creating, altering, and rolling back migrations safely, with emphasis on reversibility and best practices.

Core Features & Use Cases

  • Generator-based migrations and up/down reversibility
  • Managing references, foreign keys, and indexes
  • Zero-downtime strategies and complex patterns (UUIDs, partitioning, enums, join tables)
  • Use cases include adding columns, creating join tables, and refactoring schemas across development, staging, and production

Quick Start

Generate a new Rails migration and apply it to the database.

Frequently Asked Questions about rails-migrations

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

FAQPage Schema
How do I create reversible Rails database migrations with up and down patterns?

Rails migrations support reversible up/down patterns and reversible blocks, allowing schema changes to be safely rolled back. This covers adding columns, modifying indexes, and managing references across development, staging, and production.

What is the best way to add references and foreign keys in ActiveRecord migrations?

ActiveRecord migrations manage references and foreign keys using generator-based commands. This approach safely establishes relationships and indexes while maintaining reversibility across development, staging, and production environments.

Can I achieve zero-downtime database schema changes in Rails?

Zero-downtime strategies in Rails migrations enable schema changes without blocking production traffic. These patterns support complex constructs like UUIDs, partitioned tables, and enums during refactoring across environments.

How do Rails migrations handle complex schema constructs like UUIDs and partitioned tables?

Rails migrations support complex schema constructs including UUIDs, partitioned tables, and enums through generator-based patterns. This enables safe creation and alteration of advanced database structures with reversible up/down logic.

Do I need to manage Rails migrations differently across staging and production environments?

Rails migrations require careful management across staging and production to prevent errors. Emphasizing reversibility and best practices ensures schema changes, column modifications, and indexes apply safely within each environment.