mirror of
https://github.com/wekan/wekan.git
synced 2025-12-29 21:58:49 +01:00
Add support for MongoDB 3-8, detecting which one is in use.
Thanks to xet7 !
This commit is contained in:
parent
1f5a549589
commit
74ccfea570
11 changed files with 1650 additions and 7 deletions
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue