Open mohanelankuppan opened 5 years ago
change of value is NOT working
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) }); }
During migrate the value is NOT changing in DB
change of value is NOT working
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) }); }
During migrate the value is NOT changing in DB