Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika@curoverse.com>
[arvados.git] / services / api / db / migrate / 20150423145759_no_filenames_in_collection_search_index.rb
index 7b52abd0120b0037adafaf9163623dfb62bc8b7a..4e1379e2aab7f6bfb5c7a7310ffd3db40608f643 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class NoFilenamesInCollectionSearchIndex < ActiveRecord::Migration
   def up
     remove_index :collections, :name => 'collections_search_index'
@@ -5,5 +9,7 @@ class NoFilenamesInCollectionSearchIndex < ActiveRecord::Migration
   end
 
   def down
+    remove_index :collections, :name => 'collections_search_index'
+    add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "uuid", "name", "file_names"], name: 'collections_search_index'
   end
 end