4523: update migration script to use execute instead of update_sql so that output...
authorRadhika Chippada <radhika@curoverse.com>
Wed, 14 Jan 2015 16:24:20 +0000 (11:24 -0500)
committerRadhika Chippada <radhika@curoverse.com>
Wed, 14 Jan 2015 16:24:20 +0000 (11:24 -0500)
services/api/db/migrate/20141208174653_collection_file_names.rb

index fdcd95f2bbd5f1c6ff9bbd09a3931beb786f5dfa..0aeb3d4ac1007c3218e267c0d58183219654f84e 100644 (file)
@@ -7,7 +7,7 @@ class CollectionFileNames < ActiveRecord::Migration
     act_as_system_user do
       Collection.find_each(batch_size: 20) do |c|
         file_names = c.manifest_files
-        update_sql "UPDATE collections
+        ActiveRecord::Base.connection.execute "UPDATE collections
                     SET file_names = #{ActiveRecord::Base.connection.quote(file_names)}
                     WHERE uuid = '#{c.uuid}'"
       end