修复非自定义字段变成了非自定字段

db.schemas.find({name:"project_customers_5af11aed7836e53262f5572c.json"}).forEach(function(x) {
var json = JSON.parse(x.schema);
if(json.properties && json.properties.promoter_3) {
delete json.properties.promoter_3.$ref;
delete json.definition;
db.schemas.update({_id:x._id},{$set:{schema:JSON.stringify(json)}},false,true);
}
});

你可能感兴趣的:(修复非自定义字段变成了非自定字段)