fix: node patch
This commit is contained in:
14
patch/v2.0.0-alpha.1.js
Normal file
14
patch/v2.0.0-alpha.1.js
Normal 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: '' } }),
|
||||
])
|
||||
})
|
||||
Reference in New Issue
Block a user