lib/lockbox/migrator.rb in lockbox-0.3.3 vs lib/lockbox/migrator.rb in lockbox-0.3.4
- old
+ new
@@ -65,10 +65,10 @@
end
end
relation = relation.merge(or_relation)
else
- relation = relation.or(attributes.map { |a| {a => nil} })
+ relation.merge(relation.unscoped.or(attributes.map { |a| {a => nil} }))
end
end
each_batch(relation) do |records|
migrate_records(records, fields: fields, blind_indexes: blind_indexes, restart: restart, rotate: rotate)