Shun Miyazawa 2 лет назад
Родитель
Сommit
56439274c7
1 измененных файлов с 26 добавлено и 0 удалено
  1. 26 0
      bin/data-migrations/src/processors/custom.js

+ 26 - 0
bin/data-migrations/src/processors/custom.js

@@ -0,0 +1,26 @@
+
+/* eslint-disable no-undef, no-var, vars-on-top, no-restricted-globals, regex/invalid */
+// ignore lint error because this file is js as mongoshell
+
+// ===========================================
+// processors for old format
+// ===========================================
+
+function customProcessor(body) {
+  // ADD YOUR PROCESS HERE!
+  // https://github.com/weseek/growi/discussions/7180
+  return body;
+}
+
+function getProcessorArray(migrationType) {
+  var oldFormatProcessors;
+  switch (migrationType) {
+    case 'custom':
+      oldFormatProcessors = [customProcessor];
+      break;
+    default:
+      oldFormatProcessors = [];
+  }
+}
+
+module.exports = getProcessorArray;