Repository navigation
|
I am trying to convert a couchdb database to a git repository, storing the version histories of each document, ideally with the commit time (or chronical order) matching those made in the database - so that if I run it again, it exactly reproduces the repository. I found two difficulties
I wrote the following bash script for this conversion https://github.com/NeuroJSON/neuroj/blob/main/bin/couch2git it wasn't able to solve the above two issues, despite that it can produce something close. if a document has multiple revisions, I have to use I am wondering if either the complete change history, or the update time is available in couchdb? I recently started using the any comment on how to get such information would be appreciated! |
Replies: 2 comments
|
Heya, there is no facility in CouchDB, including the _changes feed that guarantees you see each revision of each doc, so any solution has the possibility of missing revisions. |
|
As Jan has said, CouchDB does not store the full history of documents (and never has). Nor does it add any data (such as a timestamp) other than what you added yourself. You can certainly build an application on top of CouchDB that does both, though. |
As Jan has said, CouchDB does not store the full history of documents (and never has). Nor does it add any data (such as a timestamp) other than what you added yourself. You can certainly build an application on top of CouchDB that does both, though.