From e145e76e7fd148da9fe2b8a6f5f79f7950077f2e Mon Sep 17 00:00:00 2001 From: Nicolas Burtey Date: Wed, 20 Dec 2023 19:10:19 -0600 Subject: [PATCH] chore: earn migration part 2 --- .../20231220190840-quiz-new-collection-2.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 core/api/src/migrations/20231220190840-quiz-new-collection-2.ts diff --git a/core/api/src/migrations/20231220190840-quiz-new-collection-2.ts b/core/api/src/migrations/20231220190840-quiz-new-collection-2.ts new file mode 100644 index 0000000000..0fe8ce4e86 --- /dev/null +++ b/core/api/src/migrations/20231220190840-quiz-new-collection-2.ts @@ -0,0 +1,11 @@ +module.exports = { + /* eslint @typescript-eslint/ban-ts-comment: "off" */ + // @ts-ignore-next-line no-implicit-any error + async up(db) { + console.log("Begin earn removal") + const res = await db + .collection("accounts") + .updateMany({}, { $unset: { earn: 1 } }, { multi: true }) + console.log({ res }, `end earn removal`) + }, +}