Changed Log.all.each to Log.find_each because Log.all loads all records (!) and
[arvados.git] / services / api / db / migrate / 20140423132913_add_object_owner_to_logs.rb
index 7fa47028d0741bf7a2f8981f4f5784d67e54c94a..b8ca438416baea06f5303f2ded77f1477b4bdccc 100644 (file)
@@ -4,7 +4,7 @@ class AddObjectOwnerToLogs < ActiveRecord::Migration
   def up
     add_column :logs, :object_owner_uuid, :string
     act_as_system_user do
-      Log.all.each do |log|
+      Log.find_each do |log|
         if log.properties[:new_attributes]
           log.object_owner_uuid = log.properties[:new_attributes][:owner_uuid]
         elsif log.properties[:old_attributes]