diff --git a/models/attachments.js b/models/attachments.js index 51015a18a..92cc29913 100644 --- a/models/attachments.js +++ b/models/attachments.js @@ -91,6 +91,7 @@ Attachments = new FilesCollection({ }); Attachments.update({ _id: fileObj._id }, { $set: { "versions" : fileObj.versions } }); + Attachments.update({ _id: fileObj.uploadedAtOstrio }, { $set: { "uploadedAtOstrio" : this._now() } }); let storageDestination = fileObj.meta.copyStorage || STORAGE_NAME_GRIDFS; Meteor.defer(() => Meteor.call('validateAttachmentAndMoveToStorage', fileObj._id, storageDestination)); diff --git a/server/migrations.js b/server/migrations.js index 362b2b4f7..2f58c2624 100644 --- a/server/migrations.js +++ b/server/migrations.js @@ -1281,7 +1281,8 @@ Migrations.add('migrate-attachments-collectionFS-to-ostrioFiles', () => { cardId: fileObj.cardId, listId: fileObj.listId, swimlaneId: fileObj.swimlaneId, - uploadedAt: fileObj.uploadedAt, + uploadedBeforeMigration: fileObj.uploadedAt, + migrationTime: this.now(), copies: fileObj.copies, source: 'import' },