Merge branch '18691-freeze-project'
[arvados.git] / services / api / db / migrate / 20220303204419_add_frozen_by_uuid_to_group_search_index.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddFrozenByUuidToGroupSearchIndex < ActiveRecord::Migration[5.0]
6   disable_ddl_transaction!
7
8   def up
9     remove_index :groups, :name => 'groups_search_index'
10     add_index :groups, ["uuid", "owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "name", "group_class", "frozen_by_uuid"], name: 'groups_search_index', algorithm: :concurrently
11   end
12
13   def down
14     remove_index :groups, :name => 'groups_search_index'
15     add_index :groups, ["uuid", "owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "name", "group_class"], name: 'groups_search_index', algorithm: :concurrently
16   end
17 end