1

I need to store some documents in Couchdb. The document will have one attachment.

Sometimes (rarely) I will need to replace the attachment with a new version, but I need to perserve the old version.

The revision mechanism would be ideal for this task, as it does automagically what I need.

The problem is, CouchDB removes old revisions during compaction.

How to disable _compact operation for one database, so even Admin cannot do it by accident (I know, admin can do anything, and if he would like to, he could re-enable _compact operation and do _compact, but I assume he will not).

Is it even possible? Is it a good idea, or should I write my own revision system, and why?

Best regards

SWilk

EDIT: It seems the "revision" is not suitable to be a version control system and shold not be used this way: How should CouchDB revisions be treated from a design perspective?

Community
  • 1
  • 1
SWilk
  • 3,261
  • 8
  • 30
  • 51
  • As you found out in [How should CouchDB revisions be treated from a design perspective?](http://stackoverflow.com/questions/8263043/how-should-couchdb-revisions-be-treated-from-a-design-perspective), using the revision mechanism for version control should be avoided. Voting to close. – Simon Jun 23 '12 at 07:05
  • Agreed. This isn't the intention, although maybe it should be possible. You'd do better to roll old versions into your documents. – sarwar Aug 09 '12 at 05:40

0 Answers0