fix: node patch

This commit is contained in:
Innei
2021-10-02 13:12:00 +08:00
parent b7db64e3ae
commit 1ea8ab211d
11 changed files with 44 additions and 78 deletions

14
patch/v2.0.0-alpha.1.js Normal file
View File

@@ -0,0 +1,14 @@
// patch for version lower than v2.0.0-alpha.1
const bootstrap = require('./bootstrap')
bootstrap(async (db) => {
return await Promise.all([
['notes', 'posts'].map(async (collectionName) => {
return db
.collection(collectionName)
.updateMany({}, { $unset: { options: 1 } })
}),
db.collection('categories').updateMany({}, { $unset: { count: '' } }),
])
})