X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4115524460e89f36b99f2fb5de1adebd86daaf4a..bd5a371cc0f57aea20c0954f532db5890dae5c59:/services/api/db/migrate/20161213172944_full_text_search_indexes.rb diff --git a/services/api/db/migrate/20161213172944_full_text_search_indexes.rb b/services/api/db/migrate/20161213172944_full_text_search_indexes.rb index 4cb4d978a1..3f484b4c31 100644 --- a/services/api/db/migrate/20161213172944_full_text_search_indexes.rb +++ b/services/api/db/migrate/20161213172944_full_text_search_indexes.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class FullTextSearchIndexes < ActiveRecord::Migration def fts_indexes { @@ -14,6 +18,7 @@ class FullTextSearchIndexes < ActiveRecord::Migration def up # remove existing fts indexes and create up to date ones with no leading space fts_indexes.each do |t, i| + t.classify.constantize.reset_column_information ActiveRecord::Base.connection.indexes(t).each do |idx| if idx.name == i remove_index t.to_sym, :name => i