From 8cb378a8ccff988feb5cf3d2799bf5ce6a3dbd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Dr=C3=A9au?= Date: Thu, 12 Oct 2023 17:15:53 +0200 Subject: [PATCH] feat: nettoyage setup_step_courante --- ...0001-clean-up-old-organismes-configuration.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 server/src/db/migrations/20231012000001-clean-up-old-organismes-configuration.ts diff --git a/server/src/db/migrations/20231012000001-clean-up-old-organismes-configuration.ts b/server/src/db/migrations/20231012000001-clean-up-old-organismes-configuration.ts new file mode 100644 index 000000000..57f8a7b23 --- /dev/null +++ b/server/src/db/migrations/20231012000001-clean-up-old-organismes-configuration.ts @@ -0,0 +1,16 @@ +import { Db } from "mongodb"; + +export const up = async (db: Db) => { + // nettoyage setup_step_courante suite à la revue du paramétrage des organismes + await db.collection("organismes").updateMany( + {}, + { + $unset: { + setup_step_courante: 1, + }, + }, + { + bypassDocumentValidation: true, + } + ); +};