21700: Install Bundler system-wide in Rails postinst
[arvados.git] / services / api / db / migrate / 20230421142716_add_name_index_to_collections_and_groups.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class AddNameIndexToCollectionsAndGroups < ActiveRecord::Migration[5.2]
6   def up
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)'
9   end
10   def down
11     ActiveRecord::Base.connection.execute 'DROP INDEX index_collections_on_name'
12     ActiveRecord::Base.connection.execute 'DROP INDEX index_groups_on_name'
13   end
14 end