Releases: zendesk/active_record_shards
v5.3.2
ActiveRecord Shards v5.2.0
Added
Support for Rails 7.0 when legacy_connection_handling is set to true. This is required to opt-out of the native Rails 6.1+ sharding support.
Fixed
Rails 6.1 deprecation warnings.
Changed
Started testing with Ruby 3.1
Full diff: v5.1.0...v5.2.0
ActiveRecord Shards v5.1.0
Added
Support for Rails 6.1 when legacy_connection_handling is set to true. This is required to opt-out of the native Rails 6.1 sharding support.
Full Changelog: v5.0.0...v5.1.0
ActiveRecord Shards v5.0.0
Changed
- Rename
ActiveRecordShards.rails_envtoActiveRecordShards.app_env, and includeAPP_ENVandENV['APP_ENV']in the list of places it looks for environment information. - Removed support for Ruby 2.3, 2.4, and 2.5.
- Removed support for Rails 4.2 and 5.0.
[Deprecation] Removes all deprecated methods containing master/slave. Use the updated primary/replica methods instead. The main public methods changed:
on_slave=>on_replicaon_master=>on_primary
other methods changed:
on_master_if=>on_primary_ifon_slave_if=>on_replica_ifon_master_unless=>on_primary_unlesson_slave_unless=>on_replica_unlesson_master_or_slave=>on_primary_or_replicaexists_with_default_slave=>exists_with_default_replicafrom_slave=>from_replicainitialize_shard_and_slave=>initialize_shard_and_replicaShardSelection#optionsno longer uses:slave, if this method was overridden ensure it returns:replicainstead of:slave:{ shard: .., replica: ... }
Also removes the class ActiveRecordShards::Deprecation.
Added
Add a global setting to disable marking instances from replicas as read-only. To enable:
ActiveRecordShards.disable_replica_readonly_records = true
ActiveRecord Shards v3.21.0
Added
Add a global setting to disable marking instances from replicas as read-only. To enable:
ActiveRecordShards.disable_replica_readonly_records = true
ActiveRecord Shards v3.20.0
Changed
Rename ActiveRecordShards.rails_env to ActiveRecordShards.app_env, and include APP_ENV and ENV['APP_ENV'] in the list of places it looks for environment information.
ActiveRecord Shards v3.19.3
Fixed
Fixed terrible performance when used with Rails 6.0 and having many shards defined in the database configuration.
ActiveRecord Shards v3.19.2
Fixed
Fix a bug when the given database configuration was already "exploded" with deprecated keys, e.g. test_slave or others ending with _slave.
ActiveRecord Shards v3.19.1
Fixed
Converts the ActiveRecord::Base.configurations object introduced in Rails 6 into a hash as expected.
ActiveRecord Shards v3.19.0
Changed / Fixed
Lots of improvements to the on_replica_by_default logic, now covered by an improved test suite. Schema loading should now always happen on the replica databases, and non-mutating queries will should now happen on the replica except when on_replica_by_default is not configured.