8079: add uuid to api_client_authorizations_search_index and add uuid to all api_clie...
[arvados.git] / services / api / db / migrate / 20160209155729_add_uuid_to_api_token_search_index.rb
diff --git a/services/api/db/migrate/20160209155729_add_uuid_to_api_token_search_index.rb b/services/api/db/migrate/20160209155729_add_uuid_to_api_token_search_index.rb
new file mode 100644 (file)
index 0000000..c246591
--- /dev/null
@@ -0,0 +1,8 @@
+class AddUuidToApiTokenSearchIndex < ActiveRecord::Migration
+  def change
+    remove_index :api_client_authorizations, :name => 'api_client_authorizations_search_index'
+         add_index :api_client_authorizations,
+              ["api_token", "created_by_ip_address", "last_used_by_ip_address", "default_owner_uuid", "uuid"],
+              name: "api_client_authorizations_search_index"
+  end
+end