[ARVADOS] updated: 71b1b7b045419817d1c9dc62a3a296b746d9117c

git at public.curoverse.com git at public.curoverse.com
Mon Apr 28 11:03:06 EDT 2014


Summary of changes:
 .../20140421151939_rename_auth_keys_user_index.rb  |   11 +++++++++++
 services/api/db/schema.rb                          |    2 +-
 2 files changed, 12 insertions(+), 1 deletions(-)
 create mode 100644 services/api/db/migrate/20140421151939_rename_auth_keys_user_index.rb

       via  71b1b7b045419817d1c9dc62a3a296b746d9117c (commit)
      from  7fbcd989af9949b11ddfec0c9ebfaa96a655eef4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 71b1b7b045419817d1c9dc62a3a296b746d9117c
Author: Brett Smith <brett at curoverse.com>
Date:   Mon Apr 28 11:03:22 2014 -0400

    api: Shorten name of authorized_keys index.
    
    I had trouble running the new TimestampsNotNull migration, because I
    ran into the index name limit described in the migration comments.
    Running this migration first worked around the problem for me, and I
    hope it saves others from tripping over it too.

diff --git a/services/api/db/migrate/20140421151939_rename_auth_keys_user_index.rb b/services/api/db/migrate/20140421151939_rename_auth_keys_user_index.rb
new file mode 100644
index 0000000..2b057f0
--- /dev/null
+++ b/services/api/db/migrate/20140421151939_rename_auth_keys_user_index.rb
@@ -0,0 +1,11 @@
+class RenameAuthKeysUserIndex < ActiveRecord::Migration
+  # Rails' default name for this index is so long, Rails can't modify
+  # the index later, because the autogenerated temporary name exceeds
+  # PostgreSQL's 64-character limit.  This migration gives the index
+  # an explicit name to work around that issue.
+  def change
+    rename_index("authorized_keys",
+                 "index_authorized_keys_on_authorized_user_uuid_and_expires_at",
+                 "index_authkeys_on_user_and_expires_at")
+  end
+end
diff --git a/services/api/db/schema.rb b/services/api/db/schema.rb
index af751fa..988cb87 100644
--- a/services/api/db/schema.rb
+++ b/services/api/db/schema.rb
@@ -64,7 +64,7 @@ ActiveRecord::Schema.define(:version => 20140422011506) do
     t.datetime "updated_at",              :null => false
   end
 
-  add_index "authorized_keys", ["authorized_user_uuid", "expires_at"], :name => "index_authorized_keys_on_authorized_user_uuid_and_expires_at"
+  add_index "authorized_keys", ["authorized_user_uuid", "expires_at"], :name => "index_authkeys_on_user_and_expires_at"
   add_index "authorized_keys", ["uuid"], :name => "index_authorized_keys_on_uuid", :unique => true
 
   create_table "collections", :force => true do |t|

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list