Added upgrade code for MongoDB.