14819: Merge branch 'master' into 14819-arvados-jobs-on-stretch
[arvados.git] / services / api / db / migrate / 20180806133039_index_all_filenames.rb
index 79259f91d8cca89c8ec47e0011034acd8fddf4ab..36b155cc2580e823429b2783b0c6542234c7eb0a 100644 (file)
@@ -5,12 +5,6 @@
 class IndexAllFilenames < ActiveRecord::Migration
   def up
     ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN file_names TYPE text'
-    Collection.find_each(batch_size: 20) do |c|
-      ActiveRecord::Base.connection.execute "UPDATE collections
-                    SET file_names = #{ActiveRecord::Base.connection.quote(c.manifest_files)}
-                    WHERE uuid = #{ActiveRecord::Base.connection.quote(c.uuid)}
-                    AND portable_data_hash = #{ActiveRecord::Base.connection.quote(c.portable_data_hash)}"
-    end
   end
   def down
     ActiveRecord::Base.connection.execute 'ALTER TABLE collections ALTER COLUMN file_names TYPE varchar(8192)'