Upgrade Bucket of document

migration
query
n1ql
index

#1

Suppose i have one bucket and there are several document.After Some days of development i need to add new data on document.How can i add same data in all documents of a bucket ??


#2

It is JOSN and schema less. If you need add new field to document, you don’t have to add all the documents, you can add only documents you need.

Example:  "k1" -  {"a":1, "b":2}  , "k2"  - {"a":10, "c":20}
If you use N1QL   get the documents that has only field b
                    SELECT * FROM default WHERE b IS NOT MISSING;

If you want update  all documents with x 
UPDATE default SET x = "Hello" WHERE ....