X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/39c17737ac69d7693684fe2f95bef0ec235a28bf..b16f84a8c5562cd5c3939e8c445dc86df2be2d4b:/services/api/db/migrate/20180806133039_index_all_filenames.rb diff --git a/services/api/db/migrate/20180806133039_index_all_filenames.rb b/services/api/db/migrate/20180806133039_index_all_filenames.rb index 79259f91d8..36b155cc25 100644 --- a/services/api/db/migrate/20180806133039_index_all_filenames.rb +++ b/services/api/db/migrate/20180806133039_index_all_filenames.rb @@ -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)'