Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Releases: zendesk/active_record_shards

ActiveRecord Shards v3.18.0

20 Dec 10:59
51451e2

Choose a tag to compare

Changed / Deprecated

Adds deprecation warning for all methods containing master/slave which recommends using the updated primary/replica methods. The main public methods changed:

  1. on_slave => on_replica
  2. on_master => on_primary

other methods changed:

  1. on_master_if => on_primary_if
  2. on_slave_if => on_replica_if
  3. on_master_unless => on_primary_unless
  4. on_slave_unless => on_replica_unless
  5. on_master_or_slave => on_primary_or_replica
  6. exists_with_default_slave => exists_with_default_replica
  7. from_slave => from_replica
  8. initialize_shard_and_slave => initialize_shard_and_replica
  9. ShardSelection#options no longer uses :slave, if this method was overridden ensure it returns :replica instead of :slave: { shard: .., replica: ... }

SQL comments (see debugging) will now log ... /* replica */ instead of ... /* slave */