>>When you compact the database it removes all but the most recent version of 
>>each document. 


Does this mean that if I want to support document version feature, I can not 
compact the database ?

Let's say I am working on a Word document, I upload it as an attachment; I need 
to have a list of all versions for this file and can download any of previous 
version. 

Is this how I should model it in CouchDB:
 - have a version field, not using the CouchDB _rev. update the version in my 
application.
 - when uploading the modified Word document, a doc with a different ID is 
created. So compacting a DB will not affect them.
    but how to get a list of all versions of this document ? I need to use 
another field to identify them, for example, another application generated ID.

Is this the general practice ? I am sure supporting versioning is a common 
request, so appreciate if you can provide some advices..
thanks,
canal


      

Reply via email to