-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Try Support ActiveRecord 6.1.Z #25
base: support-ruby3.0
Are you sure you want to change the base?
Conversation
@@ -32,6 +32,7 @@ module ActiveRecordExt | |||
ActiveRecord::ConnectionAdapters::ConnectionHandler.prepend(ConnectionHandlerExtension) | |||
ActiveRecord::Associations::Preloader::Association.prepend(AssociationPreloader) | |||
ActiveRecord::Associations::Association.prepend(Association) | |||
ActiveRecord::Associations::Builder::Association.singleton_class.prepend(Builder::Association) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -83,16 +83,11 @@ def setup_fixtures(config = ActiveRecord::Base) | |||
@fixture_connections = [] | |||
@@already_loaded_fixtures ||= {} | |||
@connection_subscriber = nil | |||
@legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
legacyって何に使うっけ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この辺りは ActiveRecord::TestFixtures
で定義されてるやつを真似しただけ
rails/rails#40384
LGTM |
主に以下の変更に対して対応をした
retrieve_connection_pool
の引数が変わったconnected_to
andconnects_to
for horizontal sharding rails/rails#38531pool_key
toshard
and use kwargs for connection methods rails/rails#40006ConnectionPool#spec
がなくなった(db_config
を挟むようになった?)add_to_transaction
の引数が変わったsync_with_transaction_state
to simplify code base rails/rails#39121ActiveRecord::Base.configurations[env]
が Hash を返さなくなったTestFixtures
が新しくインスタンス変数を持つようになったUNSUPPORTED_PROXY_METHODS
は、AR6.1 で増えたメソッドをとりあえず無視している