Add support for MongoDB 3-8, detecting which one is in use.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2025-10-11 10:32:20 +03:00
parent 1f5a549589
commit 74ccfea570
11 changed files with 1650 additions and 7 deletions

View file

@ -206,7 +206,7 @@ Migrations.add('use-css-class-for-boards-colors', () => {
Migrations.add('denormalize-star-number-per-board', () => {
Boards.find().forEach(board => {
const nStars = Users.find({ 'profile.starredBoards': board._id }).count();
const nStars = Users.find({ 'profile.starredBoards': board._id }).countDocuments();
Boards.update(board._id, { $set: { stars: nStars } }, noValidate);
});
});