Skip to content

Rails 8.1 support (without CLOB fixes)#2491

Open
andynu wants to merge 11 commits intorsim:masterfrom
andynu:rails-81-clean
Open

Rails 8.1 support (without CLOB fixes)#2491
andynu wants to merge 11 commits intorsim:masterfrom
andynu:rails-81-clean

Conversation

@andynu
Copy link
Collaborator

@andynu andynu commented Jan 30, 2026

This PR is a sister PR to #2480, containing the same Rails 8.1 compatibility changes but without the CLOB-related fixes. This allows for separate review of the core Rails 8.1 API changes.

Relationship to Other PRs

PR Description Status
#2480 Rails 8.1 support (full, with CLOB fixes) Open
This PR Rails 8.1 support (without CLOB fixes) For review
#2485 Fix CLOB/BLOB insertion when prepared_statements is false Open
#2486 Support ROWID-based LOB writes for tables without primary keys Open

Recommendation

While this PR can be merged independently, I strongly recommend also including #2485 and #2486 in the 8.1 release. Rails 8.1 changes prepared_statements defaults in ways that will exacerbate CLOB insertion issues for users who haven't explicitly configured this setting.

Changes Included

All core Rails 8.1 API compatibility fixes from @akostadinov's work in #2471:

  • Column constructor signature change - Updated for Eliminate queries loading dumped model schema on Postgres rails/rails#54333
  • Schema dumping method rename - dump_schema_informationdump_schema_versions
  • Native database types refactoring - Moved to class method for Rails 8.1's static type resolution
  • Distinct column API changes (by @mayorova) - Updated for Rails 7.1+ API
  • Composite primary key tests - New comprehensive test suite
  • Test reliability improvements - Proper type map clearing and connection handling
  • ExplainSubscriber removal - Rails 8.1 refactored this away

What's NOT Included

The CLOB/BLOB fixes from #2485 and #2486:

  • before_create/after_create callbacks for LOB writes
  • ROWID-based LOB writes for tables without primary keys
  • Comprehensive LOB callback test suite

Credits

The vast majority of this work was done by Aleksandar N. Kostadinov (@akostadinov) and Daria Mayorova (@mayorova) in PR #2471.

Testing

CI will verify tests pass against Rails 8.1 (8-1-stable branch).

@andynu andynu force-pushed the rails-81-clean branch 4 times, most recently from 2aa554a to 51eff9f Compare February 4, 2026 15:03
andynu and others added 11 commits February 4, 2026 10:07
Rails 8.1 removed the ExplainSubscriber class (commit f488878f1bc),
causing test failures with: NameError: uninitialized constant
ActiveRecord::ExplainSubscriber

The ExplainSubscriber functionality was refactored into ExplainRegistry
with lazy subscription - instead of subscribing at initialization,
Rails 8.1 now subscribes only when .explain is first called via
ExplainRegistry.start.

The spec_helper.rb line that manually subscribed to ExplainSubscriber
is no longer needed or valid. Rails 8.1 handles the subscription
automatically and lazily.

Related Rails commit:
- f488878f1bc "Refactor ExplainRegistry to only be subscribed once used"
- Author: Jean Boussier
- Date: Thu Sep 25 10:37:09 2025 +0200
- Link:
rails/rails@f488878
Switch from pre-release alpha constraint to stable release constraint
for ActiveRecord 8.1.0 dependency, following Rails 8.1 stable release.
Document Rails 8.1 support with installation instructions, including
the gem version constraint for activerecord-oracle_enhanced-adapter 8.1.
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.

3 participants