Log.find_each loads records in batches. Hopefully this will enable migration
to run without being killed.
def up
add_column :logs, :object_owner_uuid, :string
act_as_system_user do
def up
add_column :logs, :object_owner_uuid, :string
act_as_system_user do
if log.properties[:new_attributes]
log.object_owner_uuid = log.properties[:new_attributes][:owner_uuid]
elsif log.properties[:old_attributes]
if log.properties[:new_attributes]
log.object_owner_uuid = log.properties[:new_attributes][:owner_uuid]
elsif log.properties[:old_attributes]