Make SchemaCacheWithRenamedTable compatible with Rails 7.1
What does this MR do and why?
SchemaCacheWithRenamedTable
overrides some methods in ActiveRecord::ConnectionAdapters::SchemaCache
.
In 7.1, the method parameters in ActiveRecord::ConnectionAdapters::SchemaCache
has been changed to have connection
as the first parameter. It was (table_name)
and now it is (connection, table_name)
.
- https://github.com/rails/rails/blob/v7.1.0/activerecord/lib/active_record/connection_adapters/schema_cache.rb
- diff 7.0.8 -> 7.1.0
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
To verify this works with Rails 7.0.8:
- Start a console
bin/rails console
and ensure Rails console is up and running.
To verify this works with Rails 7.1:
- Check out the
HEAD
of this test MR !131865 (closed). It contains the upgraded Rails gem and other patches required to get Rails console working. - Apply the diff from this MR onto the Rails 7.1 branch.
- Start a console
bin/rails console
and ensure Rails console is up and running.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #427574 (closed)
Edited by Albert