migration-lock-timeout icon indicating copy to clipboard operation
migration-lock-timeout copied to clipboard

Add support for ActiveRecord 8.0 and 8.1

Open pjmartorell opened this issue 2 months ago • 0 comments

Summary

This PR adds support for ActiveRecord 8.0 and 8.1 to the migration-lock-timeout gem. Resolves #22

Changes

Gemspec

  • Updated ActiveRecord dependency constraint from < 8.0 to < 8.2
  • This allows support for ActiveRecord 8.0.x and 8.1.x releases

Test Configurations

Added 4 new Appraisal configurations:

  • activerecord_8_0 - Testing with ActiveRecord 8.0.x
  • activerecord_8_0_with_strong_migrations - Testing 8.0 with strong_migrations integration
  • activerecord_8_1 - Testing with ActiveRecord 8.1.x
  • activerecord_8_1_with_strong_migrations - Testing 8.1 with strong_migrations integration

Documentation

  • Updated CHANGELOG.md to document new Rails 8.0 and 8.1 support

Testing

All tests pass successfully across all new configurations:

Configuration ActiveRecord Version Test Results
activerecord_8_0 8.0.3 ✅ 13 examples, 0 failures
activerecord_8_0_with_strong_migrations 8.0.3 ✅ 13 examples, 0 failures
activerecord_8_1 8.1.0 ✅ 13 examples, 0 failures
activerecord_8_1_with_strong_migrations 8.1.0 ✅ 13 examples, 0 failures

Compatibility Analysis

The gem's implementation uses only stable ActiveRecord APIs that have remained unchanged in Rails 8.x:

  • ActiveRecord::Migration prepending and extending
  • execute method for SQL commands
  • disable_ddl_transaction attribute
  • Migration direction checking (:up vs :down)

Rails 8.0 and 8.1 introduce no breaking changes to these migration APIs, ensuring full compatibility.

Version Support Matrix

With this change, the gem now supports:

  • ✅ ActiveRecord 6.1.x
  • ✅ ActiveRecord 7.0.x
  • ✅ ActiveRecord 7.1.x
  • ✅ ActiveRecord 8.0.x ⭐ NEW
  • ✅ ActiveRecord 8.1.x ⭐ NEW

pjmartorell avatar Oct 23 '25 09:10 pjmartorell