瀏覽代碼

Attachment migration, try to ignore error on Cloudron on removing old index cardId

- should fix: https://github.com/wekan/wekan/issues/4407#issuecomment-1065782781
Martin Filser 3 年之前
父節點
當前提交
d18da20cdf
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      server/migrations.js

+ 4 - 1
server/migrations.js

@@ -1278,5 +1278,8 @@ Migrations.add('migrate-avatars-collectionFS-to-ostrioFiles', () => {
 });
 
 Migrations.add('migrate-attachment-drop-index-cardId', () => {
-  Attachments.collection._dropIndex({'cardId': 1});
+  try {
+    Attachments.collection._dropIndex({'cardId': 1});
+  } catch (error) {
+  }
 });