deploymentcouchdbcouchappcouchdb-futonproject-lifecycle

Storing couchDB views in code repository


I have a ruby/couchdb application with huge *.couch files full of data. What I'd like to somehow import (in mysql world i'd call it db schema, but here it's only views) in order to store them somewhere in the code repository. I need it to avoid copying huge *.couch files when setting up new empty environment.

What is the best strategy to do this? The only way which coming to my mind is:

But that's plenty of manual job, I believe that there should be some common way to do this.


Solution

  • you could use couchapp. After the project is setup with simply "couchapp push" you could deploy your new empty databases. You can read in the Couchapp documentation how to setup a couchapp, but it's really easy.

    This Blog Post http://blog.sourcebender.com/2010/07/28/loading-couchdb-views.html sounds also interesting.