1 class NoCrMountsAndWorkflowDefInFullTextSearchIndex < ActiveRecord::Migration
4 "container_requests" => "container_requests_full_text_search_idx",
5 "workflows" => "workflows_full_text_search_idx",
10 # remove existing fts index and recreate for container_requests and workflows
11 fts_indexes.each do |t, i|
12 t.classify.constantize.reset_column_information
13 ActiveRecord::Base.connection.indexes(t).each do |idx|
15 remove_index t.to_sym, :name => i
19 execute "CREATE INDEX #{i} ON #{t} USING gin(#{t.classify.constantize.full_text_tsvector});"
24 fts_indexes.each do |t, i|
25 t.classify.constantize.reset_column_information
26 ActiveRecord::Base.connection.indexes(t).each do |idx|
28 remove_index t.to_sym, :name => i