Couchdb - delete revision

How can I reinstall old versions of couchdb document?

+6
couchdb nosql
source share
2 answers

You cannot delete an old revision of a single document. This is because older revisions are used by CouchDB only for internal concurrency control, and you don’t have to worry about these revisions.

If you want to delete all old revisions to reduce the size of your database, you can run a compaction .

+12
source share

make sure that it is not enough to delete documents and their changes with the help of compression, nevertheless some data is stored in db, such as the last revision of the document.

To be 100% sure to delete all the data you need to clear your db using this api:

POST / {db} / _ purge

More details: http://docs.couchdb.org/en/1.6.1/api/database/misc.html

+2
source share

All Articles