falsepositives migration (5rd round)
This commit is contained in:
parent
d538f8cd8e
commit
21531d1fd2
1 changed files with 4 additions and 0 deletions
|
|
@ -213,11 +213,15 @@ Meteor.startup(() => {
|
|||
version: 16,
|
||||
up: function moveToFalsePositivesUppercaseWithUser() {
|
||||
const falsepositiveslower = new Mongo.Collection('falsepositives', { idGeneration: 'MONGO' });
|
||||
const now = new Date();
|
||||
falsepositiveslower.find({}).forEach((falseDoc) => {
|
||||
const user = Meteor.users.findOne({ telegramChatId: falseDoc.chatId });
|
||||
if (user) {
|
||||
falseDoc.owner= user._id;
|
||||
}
|
||||
falseDoc.type = 'industry';
|
||||
falseDoc.createdAt = now;
|
||||
falseDoc.updatedAt = now;
|
||||
FalsePositives.insert(falseDoc);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue