[ARVADOS] updated: ba0977d3755ada267f60b1f0a3299e267f013ddd
git at public.curoverse.com
git at public.curoverse.com
Thu Dec 11 22:50:16 EST 2014
Summary of changes:
services/api/db/migrate/20141208164553_owner_uuid_index.rb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
via ba0977d3755ada267f60b1f0a3299e267f013ddd (commit)
from 9bec80bcc55f2985f694b8172e755e94e11f59ae (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 ba0977d3755ada267f60b1f0a3299e267f013ddd
Author: Radhika Chippada <radhika at curoverse.com>
Date: Thu Dec 11 22:49:31 2014 -0500
4523: update db migration script for owner_uuid index to drop index only when it exists.
diff --git a/services/api/db/migrate/20141208164553_owner_uuid_index.rb b/services/api/db/migrate/20141208164553_owner_uuid_index.rb
index 35358a0..e7e38b0 100644
--- a/services/api/db/migrate/20141208164553_owner_uuid_index.rb
+++ b/services/api/db/migrate/20141208164553_owner_uuid_index.rb
@@ -14,7 +14,13 @@ class OwnerUuidIndex < ActiveRecord::Migration
def down
tables_with_owner_uuid.each do |table|
- remove_index table.to_sym, :owner_uuid
+ indexes = ActiveRecord::Base.connection.indexes(table)
+ owner_uuid_index = indexes.select do |index|
+ index.columns == ['owner_uuid']
+ end
+ if !owner_uuid_index.empty?
+ remove_index table.to_sym, :owner_uuid
+ end
end
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list