1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class AddNameIndexToCollectionsAndGroups < ActiveRecord::Migration[5.2]
7 ActiveRecord::Base.connection.execute 'CREATE INDEX index_groups_on_name on groups USING gin (name gin_trgm_ops)'
8 ActiveRecord::Base.connection.execute 'CREATE INDEX index_collections_on_name on collections USING gin (name gin_trgm_ops)'
11 ActiveRecord::Base.connection.execute 'DROP INDEX index_collections_on_name'
12 ActiveRecord::Base.connection.execute 'DROP INDEX index_groups_on_name'