mirror of
https://github.com/wekan/wekan.git
synced 2026-02-07 09:01:47 +01:00
Migrate customFields
This commit is contained in:
parent
ff19d6744e
commit
4cd0d1c397
6 changed files with 24 additions and 10 deletions
|
|
@ -525,3 +525,16 @@ Migrations.add('fix-circular-reference_', () => {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
Migrations.add('mutate-boardIds-in-customfields', () => {
|
||||
CustomFields.find().forEach((cf) => {
|
||||
CustomFields.update(cf, {
|
||||
$set: {
|
||||
boardIds: [cf.boardId],
|
||||
},
|
||||
$unset: {
|
||||
boardId: "",
|
||||
},
|
||||
}, noValidateMulti);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ Meteor.publishRelations('board', function(boardId) {
|
|||
this.cursor(Lists.find({ boardId }));
|
||||
this.cursor(Swimlanes.find({ boardId }));
|
||||
this.cursor(Integrations.find({ boardId }));
|
||||
this.cursor(CustomFields.find({ boardId }, { sort: { name: 1 } }));
|
||||
this.cursor(CustomFields.find({ boardIds: {$in: [boardId]} }, { sort: { name: 1 } }));
|
||||
|
||||
// Cards and cards comments
|
||||
// XXX Originally we were publishing the card documents as a child of the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue