falsepositives migration
This commit is contained in:
parent
1eb6e45dfe
commit
7886c1227e
1 changed files with 12 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import SiteSettings from '/imports/api/SiteSettings/SiteSettings';
|
|||
import FalsePositives from '/imports/api/FalsePositives/FalsePositives';
|
||||
import Industries from '/imports/api/Industries/Industries';
|
||||
import IndustryRegistries from '/imports/api/Industries/IndustryRegistries';
|
||||
import { Mongo } from 'meteor/mongo';
|
||||
|
||||
Meteor.startup(() => {
|
||||
// https://github.com/percolatestudio/meteor-migrations
|
||||
|
|
@ -197,6 +198,17 @@ Meteor.startup(() => {
|
|||
}
|
||||
});
|
||||
|
||||
Migrations.add({
|
||||
version: 15,
|
||||
up: function moveToFalsePositivesUppercase() {
|
||||
const falsepositiveslower = new Mongo.Collection('falsepositives', { idGeneration: 'MONGO' });
|
||||
falsepositiveslower.find({}).forEach((falseDoc) => {
|
||||
FalsePositives.insert(falseDoc);
|
||||
});
|
||||
// TODO remove falsepositives lowercase collection
|
||||
}
|
||||
});
|
||||
|
||||
// Set createdAt in users & subs
|
||||
Migrations.migrateTo('latest');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue