From 6c6f9debba78e807dd7c0d8db5bd37379b076a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?In=C3=A8s=20Yeterian?= <ines.yeterian@student-cs.fr> Date: Tue, 11 Jan 2022 17:34:29 +0100 Subject: [PATCH] nouvelle tentative --- backend/models/modelToucan.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/models/modelToucan.js b/backend/models/modelToucan.js index a745736..ffb5576 100644 --- a/backend/models/modelToucan.js +++ b/backend/models/modelToucan.js @@ -14,4 +14,7 @@ var toucanSchema = new Schema ({ // La date doit ĂȘtre unique toucanSchema.index({date:-1},{unique: true}); -module.exports = mongoose.model("Toucan",toucanSchema); \ No newline at end of file +var toucans = mongoose.model("Toucan",toucanSchema); +await toucans.updateMany( {},{$set: { toucan_id : 'example'} }, { multi: true }); + +module.exports = toucans; \ No newline at end of file -- GitLab