From 40dd1945a3cde20bc323f9fa7e7dc1c97561177f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Mon, 23 Jul 2018 00:07:06 +0200 Subject: [PATCH] drop existing indexes on reboot --- server/main.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/main.js b/server/main.js index 063ebaf0e..0b1618aeb 100644 --- a/server/main.js +++ b/server/main.js @@ -8,6 +8,14 @@ import { Insurances , insurances } from '../imports/api/insurances.js'; import { Doctors , doctors } from '../imports/api/doctors.js'; Meteor.startup(() => { + + // drop all indexes + Patients.rawCollection().dropIndexes(); + Drugs.rawCollection().dropIndexes(); + Consultations.rawCollection().dropIndexes(); + Insurances.rawCollection().dropIndexes(); + Doctors.rawCollection().dropIndexes(); + // code to run on server at startup Patients.rawCollection().createIndex({ owner: 1,