Added false positives management to website

This commit is contained in:
vjrj 2018-01-29 19:23:05 +01:00
parent 379e72a9e7
commit 674c07460b
10 changed files with 192 additions and 29 deletions

View file

@ -6,6 +6,7 @@ import randomHex from 'crypto-random-hex';
import UserSubsToFiresCollection from '/imports/api/Subscriptions/Subscriptions';
import FireAlertsCollection from '/imports/api/FireAlerts/FireAlerts';
import SiteSettings from '/imports/api/SiteSettings/SiteSettings';
import FalsePositives from '/imports/api/FalsePositives/FalsePositives';
Meteor.startup(() => {
// https://github.com/percolatestudio/meteor-migrations
@ -92,6 +93,17 @@ Meteor.startup(() => {
}
});
Migrations.add({
version: 6,
up: function falsePositiveIndexes() {
FalsePositives._ensureIndex({ chatId: 1 });
FalsePositives._ensureIndex({ owner: 1 });
FalsePositives._ensureIndex({ fireId: 1 });
FalsePositives._ensureIndex({ type: 1 });
FalsePositives._ensureIndex({ geo: '2dsphere' });
}
});
// Set createdAt in users & subs
Migrations.migrateTo('latest');