diff options
-rw-r--r-- | server/migrations.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/migrations.js b/server/migrations.js index cb64b7e8..eeb2d5ea 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -517,3 +517,11 @@ Migrations.add('add-templates', () => { }); }); }); + +Migrations.add('fix-circular-reference', () => { + Cards.find().forEach((card) => { + if (card.parentId === card._id) { + Cards.update(card._id, {$set: {parentId: ''}}, noValidateMulti); + } + }); +}); |