Sharkey/tools/migration/nighthike/6.js

14 lines
138 B
JavaScript

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