1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class FullTextSearch < ActiveRecord::Migration
8 execute "CREATE INDEX collections_full_text_search_idx ON collections USING gin(#{Collection.full_text_tsvector});"
9 execute "CREATE INDEX groups_full_text_search_idx ON groups USING gin(#{Group.full_text_tsvector});"
10 execute "CREATE INDEX jobs_full_text_search_idx ON jobs USING gin(#{Job.full_text_tsvector});"
11 execute "CREATE INDEX pipeline_instances_full_text_search_idx ON pipeline_instances USING gin(#{PipelineInstance.full_text_tsvector});"
12 execute "CREATE INDEX pipeline_templates_full_text_search_idx ON pipeline_templates USING gin(#{PipelineTemplate.full_text_tsvector});"
16 remove_index :pipeline_templates, :name => 'pipeline_templates_full_text_search_idx'
17 remove_index :pipeline_instances, :name => 'pipeline_instances_full_text_search_idx'
18 remove_index :jobs, :name => 'jobs_full_text_search_idx'
19 remove_index :groups, :name => 'groups_full_text_search_idx'
20 remove_index :collections, :name => 'collections_full_text_search_idx'