couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Gross <>
Subject Migrating documents
Date Mon, 22 Dec 2008 04:33:16 GMT
I'm new to couchdb, and one idea I've been struggling with is how to 
migrate data during a software upgrade.  For example, say I start a 
project and I have documents like:

  "type": "person",
  "name": "Joe Smith"

Now, with version 2.0 of my software, I want to split out name into 
first_name and last_name:

  "type": "person",
  "first_name": "Joe",
  "last_name": "Smith"

Or maybe I just want to rename an attribute (name => full_name).

What is the best way to migrate all of the existing documents?  Is there 
a way to do it server side, or do I have to read all of my documents and 
bulk update them?

Paul Gross

View raw message