Add a migration to add a sort field to the boards model

reviewable/pr3027/r1
boeserwolf 5 years ago
parent 2400c91013
commit 9f396e9038
  1. 12
      server/migrations.js

@ -1033,3 +1033,15 @@ Migrations.add('add-description-text-allowed', () => {
noValidateMulti,
);
});
Migrations.add('add-sort-field-to-boards', () => {
Boards.find().forEach((board, index) => {
if (!board.hasOwnProperty('sort')) {
Boards.direct.update(
board._id,
{ $set: { sort: index } },
noValidate
);
}
});
});

Loading…
Cancel
Save