couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svilen>
Subject Re: how do u handle "schema" changes ?
Date Fri, 02 Nov 2012 12:35:47 GMT
> > And once that changes - simplest example being renaming of some
> > field - what's the recipe?
> Our recipe is a small script that iterates over every document in the
> database that modifies it to comply with the new schema. We do this as
> part of upgrading the system living on top of CouchDB.
> Besides this, we have a single document containing the schema version
> and some status fields indicating if an upgrade is running or if it
> has been run failed.

this is fine and would work if all instances of the system on top are of
same version - or there is just single instance.

but with replication and all the distributed possibilities (think
phones etc).. another approach might be needed. Maybe allow multiple
schemas to co-exist.. somehow. Seems it becomes a question of schema
being the protocol, and if/how multiple variants of that can live
together. And/Or considering very hard whether a schema is
futureproof enough before publishing the software using it.. hmmm


View raw message