lib/couch_tomato/migration.rb in couch_tomato-0.1.1 vs lib/couch_tomato/migration.rb in couch_tomato-0.1.2

- old
+ new

@@ -13,11 +13,11 @@ time = Benchmark.measure do docs = db.get('_all_docs', :include_docs => true)['rows'] docs.each do |doc| next if /^_design/ =~ doc['id'] send(direction, doc['doc']) - db.save_doc(doc['doc']) end + db.bulk_save(docs) end case direction when :up then announce "migrated (%.4fs)" % time.real; write when :down then announce "reverted (%.4fs)" % time.real; write