OSS TanbouSign in with GitHub

Detect unsafe ActiveRecord migrations in development and guide teams away from long locks and table rewrites

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
4,449
Primary language
Ruby
License
MIT
Repository last updated
Sep 26, 2026
On this page

Overview

Strong Migrations checks Rails and ActiveRecord migrations for dangerous operations, blocks them by default, and suggests safer alternatives. It covers PostgreSQL, MySQL, and MariaDB operations that can cause long locks or application errors. The current version is 2.8.0.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Block migration operations likely to cause downtime or runtime errors

It checks column removals and renames, type changes, non-concurrent indexes, foreign keys, constraints, and other operations that can lock tables or break running application code.

Sources: [2]

Apply database-specific safety rules and custom checks

PostgreSQL, MySQL, and MariaDB checks can be combined with safe-by-default behavior, custom checks, timeout settings, and explicit overrides when a reviewed operation must proceed.

Sources: [2]

Best fit

Fits Rails teams standardizing zero-downtime-style schema changes

It helps move migration safety from review convention into development and CI, encouraging staged deploy, backfill, and validation patterns.

Sources: [2]

Before adoption

Automatic checks cannot prove raw SQL or backfills are safe

The documentation explicitly notes that raw SQL and dangerous backfills cannot be fully detected. Overrides require human review of locks, replicas, transactions, and deploy order. Version 2.8.0 requires Ruby 3.3+ and ActiveRecord 7.2+.

Sources: [2][3][4]

Official sources

  1. [1]ankane/strong_migrations — GitHub repository(2026-10-06)
  2. [2]Strong Migrations — README(2026-10-06)
  3. [3]Strong Migrations — gemspec(2026-10-06)
  4. [4]Strong Migrations — CHANGELOG(2026-10-06)
Supplemental curator note

It catches many migration hazards early, but it cannot prove raw SQL or backfills are safe. Explicit overrides should receive the strongest review of locks, transactions, replicas, and deploy order.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/ankane/strong_migrations.git
  2. 2

    Enter the repository

    cd strong_migrations
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

4,449 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
3
Open PRs
1

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data
Stars
4,449
Forks
200
Watchers
27
Open issues
4
Contributors
29
Owner type
User
Primary language
Ruby
License
MIT
Repository last updated
Sep 26, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?