You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/07/30 12:57:37 UTC

[Couchdb Wiki] Update of "History" by JasonDavies

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by JasonDavies:
http://wiki.apache.org/couchdb/History

New page:
= Proposal for CouchDB history support =

 * We will use a separate database to store history documents.
 * The main change will be at the couch_db level in the document update functions, so that *any* change to a document will be recorded in the history database.
 * Changes to documents will result in a new document being written to the history database, of the form:

{{{{
  _id: <uuid>,
  doc: {
    <original document>
  }
}
}}}

 * The history database is an ordinary CouchDB database that can be manipulated as normal e.g. views can be added to organise the history docs as required.
 * If people need to add meta-data to the history, e.g. "last changed by", "last changed date/time", then the recommended way would be to use a custom _update handler to add these fields to the doc being saved, and these would propagate to the history database.