X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/554728c26640c8ac26c3e97b5c3e06b6e4be3e15..d56b21609ddd2e2e096f5c30e991d24aa213f7f4:/services/api/db/migrate/20141208174653_collection_file_names.rb?ds=sidebyside diff --git a/services/api/db/migrate/20141208174653_collection_file_names.rb b/services/api/db/migrate/20141208174653_collection_file_names.rb index fdcd95f2bb..7abd778c04 100644 --- a/services/api/db/migrate/20141208174653_collection_file_names.rb +++ b/services/api/db/migrate/20141208174653_collection_file_names.rb @@ -1,4 +1,8 @@ -class CollectionFileNames < ActiveRecord::Migration +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + +class CollectionFileNames < ActiveRecord::Migration[4.2] include CurrentApiClient def up @@ -7,7 +11,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