更改值无效
async function changeValueMongo(db, next) {
res = await db.collection('mongos').find({}).forEach(async function(mongo) {
if (mongo.plan.mongoOperation && mongo.plan.mongoOperation.trip) {
mongo.plan.mongoOperation.trip.forEach(function(mongoData) {
if (mongoData.mongoMethod === 'mongo') {
mongoData.mongoMethod = 'mongodb'
}
})
}
await db.collection('mongos').save(mongo)
});
}
在迁移过程中,数据库中的值不变