migration-lock-timeout
migration-lock-timeout copied to clipboard
Add support for ActiveRecord 8.0 and 8.1
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.0to< 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.xactiverecord_8_0_with_strong_migrations- Testing 8.0 with strong_migrations integrationactiverecord_8_1- Testing with ActiveRecord 8.1.xactiverecord_8_1_with_strong_migrations- Testing 8.1 with strong_migrations integration
Documentation
- Updated
CHANGELOG.mdto 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::Migrationprepending and extendingexecutemethod for SQL commandsdisable_ddl_transactionattribute- Migration direction checking (
:upvs: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