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, + } + ); +};