Skip to content

Conversation

@pjmartorell
Copy link

@pjmartorell pjmartorell commented Oct 23, 2025

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

- 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
Copilot AI review requested due to automatic review settings October 23, 2025 09:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends the gem's ActiveRecord compatibility to include Rails 8.0 and 8.1 by updating version constraints and adding corresponding test configurations.

Key Changes:

  • Updated the ActiveRecord dependency upper bound from < 8.0 to < 8.2
  • Added four new Appraisal test configurations for ActiveRecord 8.0 and 8.1 (with and without strong_migrations)
  • Documented the new version support in the changelog

Reviewed Changes

Copilot reviewed 7 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
migration-lock-timeout.gemspec Updated ActiveRecord version constraint to allow 8.0 and 8.1
Appraisals Added test configurations for ActiveRecord 8.0 and 8.1
gemfiles/activerecord_8_0.gemfile Generated gemfile for ActiveRecord 8.0 testing
gemfiles/activerecord_8_0_with_strong_migrations.gemfile Generated gemfile for ActiveRecord 8.0 with strong_migrations
gemfiles/activerecord_8_1.gemfile Generated gemfile for ActiveRecord 8.1 testing
gemfiles/activerecord_8_1_with_strong_migrations.gemfile Generated gemfile for ActiveRecord 8.1 with strong_migrations
CHANGELOG.md Added entry documenting Rails 8.0 and 8.1 support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant