Merge branch '12690-12748-crunchstat-summary'
[arvados.git] / services / api / db / migrate / 20150206230342_rename_replication_attributes.rb
index e1519a3aab67ca975c8bcdf2d141e1ebf6dd3002..e6e54579a602664310b3fe331159d56055fb71af 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 class RenameReplicationAttributes < ActiveRecord::Migration
   RENAME = [[:redundancy, :replication_desired],
             [:redundancy_confirmed_as, :replication_confirmed],
@@ -10,7 +14,7 @@ class RenameReplicationAttributes < ActiveRecord::Migration
     remove_column :collections, :redundancy_confirmed_by_client_uuid
     Collection.reset_column_information
 
-    # Removing that column dropped some indexes. Let's put them back.
+    # Removing that column dropped some search indexes. Let's put them back.
     add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "uuid", "name", "file_names"], name: 'collections_search_index'
     execute "CREATE INDEX collections_full_text_search_idx ON collections USING gin(#{Collection.full_text_tsvector});"
   end
@@ -25,6 +29,6 @@ class RenameReplicationAttributes < ActiveRecord::Migration
     Collection.reset_column_information
 
     execute "CREATE INDEX collections_full_text_search_idx ON collections USING gin(#{Collection.full_text_tsvector});"
-    add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "redundancy_confirmed_by_client_uuid", "uuid", "name", "file_names"], name: 'collections_search_index'
+    add_index :collections, ["owner_uuid", "modified_by_client_uuid", "modified_by_user_uuid", "portable_data_hash", "uuid", "name", "file_names", "redundancy_confirmed_by_client_uuid"], name: 'collections_search_index'
   end
 end