calckey/tools/migration/nighthike/6.js

14 lines
139 B
JavaScript

db.posts.update({
$or: [{
mediaIds: null
}, {
mediaIds: {
$exists: false
}
}]
}, {
$set: {
mediaIds: []
}
}, false, true);