Skip to content
CAI
Software that uses CAICheck a score

ankane/strong_migrations

65.7

Adequate · 14 November 2026

1.8k

lines of production code

Ruby

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added alphabetize\_schema option

A new \strong\_migrations:alphabetize\_columns\ rake task has been added, which sets the \StrongMigrations.alphabetize\_schema\ configuration to \true\ to ensure schema columns are sorted alphabetically.

lib/tasks · high confidence

Added install generator for Strong Migrations configuration

Users can now run the Strong Migrations install generator to automatically create a configuration initializer at config/initializers/strong\_migrations.rb. The generated file includes a target\_version setting that defaults to 8.4 for MySQL/MariaDB/Trilogy adapters and 18 for PostgreSQL, along with a comment advising users to adjust timeouts if they use PgBouncer in transaction mode.

_lib/generators/strong\migrations · high confidence

New initializer template with safe-by-default and target version options

The strong\_migrations generator now includes a new initializer template that configures default settings such as lock and statement timeouts, automatic table analysis, and a commented-out target version setting to ensure development checks match production. It also introduces options for PostgreSQL users to enable safe-by-default behavior and automatic removal of invalid indexes, providing a more robust out-of-the-box configuration for migration safety.

_lib/generators/strong\migrations/templates · high confidence

Behavioural changes

Restructured database adapter logic and enforced minimum version requirements

The library has refactored its database-specific logic into a dedicated adapter hierarchy (AbstractAdapter, PostgreSQLAdapter, MySQLAdapter, MariaDBAdapter) to improve maintainability and accuracy. This change enforces stricter minimum version requirements, dropping support for PostgreSQL versions prior to 12, MySQL prior to 8.0, and MariaDB prior to 10.5. It also introduces support for PostgreSQL 17's transaction\_timeout setting, adds specific safety checks for MariaDB 11.4 charset handling, and corrects deprecation warnings with Active Record 7.1.

_lib/strong\migrations/adapters · high confidence

Restructured library loading and added configuration options

The library's internal structure has been refactored to replace direct ActiveRecord dependencies with ActiveSupport and introduce a modular adapter system (Abstract, MySQL, MariaDB, PostgreSQL). This change introduces numerous new configuration options for users, including \auto\_analyze\, \start\_after\, \lock\_timeout\, \statement\_timeout\, \safe\_by\_default\, \alphabetize\_schema\, and \skipped\_databases\. Additionally, the library now supports RACK\_ENV for environment detection and allows users to enable or disable specific checks via \enable\_check\ and \disable\_check\ methods.

lib · high confidence

Strong Migrations v2.8.0: Complete rewrite with safe-by-default checks and retry logic

Strong Migrations has been rewritten from the ground up (version 0.1.0 to 2.8.0) to provide a more robust and user-friendly migration safety experience. The core behavior now supports a \safe\_by\_default\ mode that automatically executes safe operations (like adding indexes or foreign keys) using non-blocking, concurrent algorithms, removing the need for manual \safety\_assured\ blocks in many common cases. The library now includes built-in retry logic for lock timeouts, configurable statement and lock timeouts, and an \auto\_analyze\ feature to maintain query performance after index creation. It also introduces new checks for complex operations like adding check constraints, exclusion constraints, and handling callable default values, while dropping support for older Ruby and Active Record versions.

_lib/strong\migrations · high confidence

Test coverage

Added test support files for ActiveRecord setup and helper methods; Comprehensive test suite for migration safety checks; Expanded test coverage for migration safety checks.

Dependencies

Added CI support for Active Record 7.2, 8.0, and 8.2

The gemfiles directory now includes dedicated configuration files for testing against Active Record 7.2, 8.0, and 8.2 (alpha). These new gemfiles ensure compatibility with these specific versions of Active Record, along with their respective database adapters (PostgreSQL, MySQL, Trilogy, and SQLite3), allowing the library to be tested against these newer versions of the framework.

gemfiles · high confidence

Drops support for Ruby \< 3.3 and Active Record \< 7.2, adds Trilogy support

The gem now requires Ruby 3.3 or higher and Active Record 7.2 or higher, removing support for older versions. Development dependencies have been moved from the gemspec to the Gemfile, and the gem now explicitly includes support for the Trilogy MySQL driver alongside existing PostgreSQL, MySQL2, and SQLite3 drivers.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 67 → 66 (-1.4)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 61 → 58 (-3.0)
  • Architecture 91 → 91 (+0.0)
  • Maturity 63 → 63 (+0.0)
  • Readiness 70 → 70 (+0.0)
  • Security 100 → 100 (+0.0)

Findings

  • No change — the same findings as the prior survey.

Changes since last survey

  • 1 commits — 0 feature/other, 1 fixes

By area

  • test/alphabetize_schema_test.rb — 1 commit

Notable commits

  • fix: Fixed test for Active Record 8.1.4 - resolves #323

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

ankane/strong_migrations was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 33234d02c076a51983826687771d84026de6d2d8 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-36d4cd83012f.