Skip to content

Commit

Permalink
drop existing indexes on reboot
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Jul 22, 2018
1 parent 26a3fae commit 40dd194
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 40dd194

Please sign in to comment.