X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1aa3f43606ba5e31633c063851d25b8fab4b93e2..a27e0874320e408124fee837b355995350bbc7ee:/services/api/db/migrate/20170216170823_no_cr_mounts_and_workflow_def_in_full_text_search_index.rb diff --git a/services/api/db/migrate/20170216170823_no_cr_mounts_and_workflow_def_in_full_text_search_index.rb b/services/api/db/migrate/20170216170823_no_cr_mounts_and_workflow_def_in_full_text_search_index.rb index 3d4a6062b4..cc1b30d4db 100644 --- a/services/api/db/migrate/20170216170823_no_cr_mounts_and_workflow_def_in_full_text_search_index.rb +++ b/services/api/db/migrate/20170216170823_no_cr_mounts_and_workflow_def_in_full_text_search_index.rb @@ -22,7 +22,13 @@ class NoCrMountsAndWorkflowDefInFullTextSearchIndex < ActiveRecord::Migration def down fts_indexes.each do |t, i| - remove_index t.to_sym, :name => 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 + break + end + end end end end