Pārlūkot izejas kodu

added ability to create a tree of cards

Nicu Tofan 7 gadi atpakaļ
vecāks
revīzija
879a84184f
2 mainītis faili ar 17 papildinājumiem un 0 dzēšanām
  1. 5 0
      models/cards.js
  2. 12 0
      server/migrations.js

+ 5 - 0
models/cards.js

@@ -15,6 +15,11 @@ Cards.attachSchema(new SimpleSchema({
       }
       }
     },
     },
   },
   },
+  parentId: {
+    type: String,
+    optional: true,
+    defaultValue: '',
+  },
   listId: {
   listId: {
     type: String,
     type: String,
   },
   },

+ 12 - 0
server/migrations.js

@@ -258,3 +258,15 @@ Migrations.add('add-assigner-field', () => {
   }, noValidateMulti);
   }, noValidateMulti);
 });
 });
 
 
+
+Migrations.add('add-parent-field-to-cards', () => {
+  Cards.update({
+    parentId: {
+      $exists: false,
+    },
+  }, {
+    $set: {
+      parentId:'',
+    },
+  }, noValidateMulti);
+});