Skip to content

Add support for ActiveRecord 8.0 and 8.1#31

Merged
joe-sharp merged 9 commits intomainfrom
joe-sharp/CUP-19
Feb 3, 2026
Merged

Add support for ActiveRecord 8.0 and 8.1#31
joe-sharp merged 9 commits intomainfrom
joe-sharp/CUP-19

Conversation

@joe-sharp
Copy link
Contributor

@joe-sharp joe-sharp commented Feb 2, 2026

Initial commit comes from: #23
Thank you pjmartorell !

Additionally it looks like we need to require Ruby 3.2 for at least ActiveRecord 8.0+. This should be reasonable to do since Ruby 3.1 has been EOL for almost a year:

Ruby 3.1
status: eol
release date: 2021-12-25
normal maintenance until: 2024-04-01
EOL: 2025-03-26

PR Description from the original PR:

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

Checklist:

  • I have updated the necessary documentation
  • I have updated the changelog, if necessary (CHANGELOG.md)
  • I have signed off all my commits as required by DCO
  • My build is green

- Updated gemspec to support ActiveRecord versions up to 8.2
- Added test configurations for ActiveRecord 8.0 and 8.1
- Added test configurations with strong_migrations integration
- Generated gemfiles for all new configurations
- All tests passing (13 examples, 0 failures) for both 8.0.3 and 8.1.0
- Updated CHANGELOG.md to document new Rails support

Signed-off-by: joe-sharp <joe.sharp@procore.com>
@joe-sharp joe-sharp self-assigned this Feb 2, 2026
Signed-off-by: joe-sharp <joe.sharp@procore.com>
@github-actions github-actions bot added the repo label Feb 2, 2026
@joe-sharp joe-sharp marked this pull request as ready for review February 2, 2026 17:50
@joe-sharp joe-sharp requested a review from a team as a code owner February 2, 2026 17:50
Signed-off-by: joe-sharp <joe.sharp@procore.com>
Signed-off-by: joe-sharp <joe.sharp@procore.com>
Signed-off-by: joe-sharp <joe.sharp@procore.com>
Signed-off-by: joe-sharp <joe.sharp@procore.com>
Signed-off-by: joe-sharp <joe.sharp@procore.com>
Signed-off-by: joe-sharp <joe.sharp@procore.com>
Signed-off-by: joe-sharp <joe.sharp@procore.com>
@joe-sharp joe-sharp merged commit 7f6329e into main Feb 3, 2026
11 checks passed
@joe-sharp joe-sharp deleted the joe-sharp/CUP-19 branch February 3, 2026 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants