Update migration script

This commit is contained in:
syuilo 2018-03-31 21:49:26 +09:00
parent 6a6eb96daa
commit 102d8467ac

View file

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