diff --git a/migrations/20241206235108-remove-crowdsourcing.js b/migrations/20241206235108-remove-crowdsourcing.js new file mode 100644 index 00000000..a61c1ae3 --- /dev/null +++ b/migrations/20241206235108-remove-crowdsourcing.js @@ -0,0 +1,17 @@ +module.exports = { + async up(db) { + const collections = ['wordsuggestions', 'examplesuggestions']; + await Promise.all( + collections.map(async (collection) => { + db.collection(collection).updateMany( + {}, + { + $unset: { crowdsourcing: null }, + } + ); + }) + ); + }, + + async down() {}, +};