Add 'sdk/java-v2/' from commit '55f103e336ca9fb8bf1720d2ef4ee8dd4e221118'
[arvados.git] / services / api / db / migrate / 20181004131141_add_current_version_uuid_to_collection_search_index.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddCurrentVersionUuidToCollectionSearchIndex < ActiveRecord::Migration
6   disable_ddl_transaction!
7
8   def up
9     remove_index :collections, :name => 'collections_search_index'
10     add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "uuid", "name", "current_version_uuid"], name: 'collections_search_index', algorithm: :concurrently
11   end
12
13   def down
14     remove_index :collections, :name => 'collections_search_index'
15     add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "uuid", "name"], name: 'collections_search_index', algorithm: :concurrently
16   end
17 end