MongoDB shell command common

Add new field to every document in a MongoDB collection

db.your_collection.update({},
                          {$set : {"new_field":1}},
                          {upsert:false,
                          multi:true}) 

Remove field from every document in a MongoDB collection

db.your_collection.update({},
                          {$unset : {"old_field":null}},
                          {upsert:false,
                          multi:true}) 

Rename field from every document in a MongoDB collection

db.your_collection.update({},
                          {$rename: {"old_field_name":"new_field_name"}},
                          {upsert:false,
                          multi:true})