Permalink
Browse files

sync all indexes, not just _id_

  • Loading branch information...
ma11hew28 committed Sep 20, 2010
1 parent 6abbcd1 commit df296c1d543d2565a17632ffcf991d0bbce12649
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/heroku/command/mongo.rb
@@ -41,10 +41,8 @@ def transfer(from, to)
dest_index_col = dest.collection('system.indexes')
origin_index_col = origin.collection('system.indexes')
origin_index_col.find().each do |index|
- if index['_id']
- index['ns'] = index['ns'].sub(origin_index_col.db.name, dest_index_col.db.name)
- dest_index_col.insert index
- end
+ index['ns'] = index['ns'].sub(origin_index_col.db.name, dest_index_col.db.name)
+ dest_index_col.insert index
end
display " done"
end

0 comments on commit df296c1

Please sign in to comment.