MongoDB: Changing column names and column types

Changing column name:  The following command will change the field called name to nickname in the collection person

db.person.update({}, {$rename: {"name" : "nickname"}}, false, true)

Changing column type: The following command will change the field called age from type String to Integer.

db.person.find().forEach( function (x) { 
x.age = parseInt(x.age);
db.person.save(x);
});