Module: ActiveRecordShards::DefaultReplicaPatches::SchemaDefinePatch
- Defined in:
- lib/active_record_shards/default_replica_patches.rb
Instance Method Summary collapse
Instance Method Details
#define(info, &block) ⇒ Object
269 270 271 272 273 274 275 |
# File 'lib/active_record_shards/default_replica_patches.rb', line 269 def define(info, &block) old_val = Thread.current[:_active_record_shards_in_migration] Thread.current[:_active_record_shards_in_migration] = true super ensure Thread.current[:_active_record_shards_in_migration] = old_val end |