You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Dilushan Delgoda <dd...@gmail.com> on 2019/08/15 10:35:15 UTC

Adding a new attribute to documents in couchdb

When we want to add new column in RDBMS we can add column with a default
value that will fill up all past records with specified default value. In
our case we want add a new attribute to a Couchdb document. After that code
expect that attribute to be there even in past records. How we going to
implement that sql like behavior in Couchdb.

-- 
Regards,
Dilushan Delgoda

Re: Adding a new attribute to documents in couchdb

Posted by Dilushan Delgoda <dd...@gmail.com>.
Hi Johannes,

Thanks for the great article. I think this article should be read by all
couchdb users. we had a same setup like discussed in the article. (web app
communicating with couchdb, app clients (pouchdb) syncing with couchdb). I
didn't know we have to go through this much troubles to do a scheme change
until read this article.

On Thu, Aug 15, 2019 at 4:18 PM Johannes Jörg Schmidt <sc...@netzmerk.com>
wrote:

> Hi Dilushan,
>
> you're touching a tough topic here: migrations in distributed database
> systems. We have written an article about it, which might be helpful:
> https://sync-tank.com/distributed-migration-strategies/.
>
> Best,
> Johannes
>
> Am Do., 15. Aug. 2019 um 12:35 Uhr schrieb Dilushan Delgoda <
> ddilushan@gmail.com>:
>
> > When we want to add new column in RDBMS we can add column with a default
> > value that will fill up all past records with specified default value. In
> > our case we want add a new attribute to a Couchdb document. After that
> code
> > expect that attribute to be there even in past records. How we going to
> > implement that sql like behavior in Couchdb.
> >
> > --
> > Regards,
> > Dilushan Delgoda
> >
>


-- 
Regards,
Dilushan Delgoda

Re: Adding a new attribute to documents in couchdb

Posted by Johannes Jörg Schmidt <sc...@netzmerk.com>.
Hi Dilushan,

you're touching a tough topic here: migrations in distributed database
systems. We have written an article about it, which might be helpful:
https://sync-tank.com/distributed-migration-strategies/.

Best,
Johannes

Am Do., 15. Aug. 2019 um 12:35 Uhr schrieb Dilushan Delgoda <
ddilushan@gmail.com>:

> When we want to add new column in RDBMS we can add column with a default
> value that will fill up all past records with specified default value. In
> our case we want add a new attribute to a Couchdb document. After that code
> expect that attribute to be there even in past records. How we going to
> implement that sql like behavior in Couchdb.
>
> --
> Regards,
> Dilushan Delgoda
>