Browse Source

Add migrations for requestedBy and assignedBy fields.

RJevnikar 7 năm trước cách đây
mục cha
commit
ea109cfdd7
1 tập tin đã thay đổi với 25 bổ sung0 xóa
  1. 25 0
      server/migrations.js

+ 25 - 0
server/migrations.js

@@ -231,3 +231,28 @@ Migrations.add('add-custom-fields-to-cards', () => {
     },
   }, noValidateMulti);
 });
+
+Migrations.add('add-requester-field', () => {
+  Cards.update({
+    requestedBy: {
+      $exists: false,
+    },
+  }, {
+    $set: {
+      requestedBy:'',
+    },
+  }, noValidateMulti);
+});
+
+Migrations.add('add-assigner-field', () => {
+  Cards.update({
+    assignedBy: {
+      $exists: false,
+    },
+  }, {
+    $set: {
+      assignedBy:'',
+    },
+  }, noValidateMulti);
+});
+