lib/couchrest/model/designs/migrations.rb in couchrest_model-2.2.0.beta1 vs lib/couchrest/model/designs/migrations.rb in couchrest_model-2.2.0.beta2
- old
+ new
@@ -44,9 +44,12 @@
doc = load_from_database(db)
cleanup = nil
id = self['_id']
if !doc
+ # make sure the checksum has been calculated
+ checksum! if !self['couchrest-hash']
+
# no need to migrate, just save it
new_doc = to_hash.dup
db.save_doc(new_doc)
result = :created