rails-migration-safety

Plan and review Rails database migrations for safe schema changes.

22|6|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/igmarin/rails-agent-skills --skill rails-migration-safety-igmarin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-migration-safety
Source: https://github.com/igmarin/rails-agent-skills/tree/main/rails-migration-safety
Command: npx skills add https://github.com/igmarin/rails-agent-skills --skill rails-migration-safety-igmarin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Efficiently plans and reviews production database migrations to minimize downtime, lock contention, and rollout risks.

Core Features & Use Cases

  • Phased rollout guidance for schema changes
  • Backfill strategy outside long transactions
  • Rollback and deployment sequencing validation

Quick Start

Outline a phased rollout plan for adding a nullable column to a busy table and outline backfill and rollback steps.

Frequently Asked Questions about rails-migration-safety

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

FAQPage Schema
How do I plan safe Rails migrations for production databases?

Plan safe Rails migrations by validating phased rollout sequencing, ensuring safe indexing, and separating backfills from schema changes to minimize downtime and lock contention on large tables.

Why does adding a column with a backfill lock my Rails database table?

Combined backfills and schema changes cause long transactions that lock tables. Execute backfills outside long transactions and sequence deployment steps separately to avoid lock contention during Rails migrations.

What is the best way to rollback a phased Rails migration on a large schema?

Rollback phased Rails migrations by validating deployment sequencing and locking behavior beforehand. Outline specific rollback steps for each phase to safely reverse schema changes on large database schemas.

How do phased rollouts work for adding nullable columns in Rails?

Phased rollouts for nullable columns involve adding the column, deploying application code, backfilling data outside transactions, and validating rollback steps. This avoids locking busy tables during schema changes.

Does this approach ensure strong_migrations compliance for Rails schema changes?

Yes, the approach specifies requirements for safe indexing, avoiding combined backfills and schema changes, and deployment sequencing as formal checks to ensure strong_migrations compliance across large Rails schemas.

When should I not use combined backfills during Rails database migrations?

Avoid combined backfills during Rails database migrations when modifying busy tables on large schemas. Long transactions from combined operations cause lock contention and downtime risks during production deployments.