fix: Revision skipped after identical previous autosave

This commit is contained in:
Tom Moor
2020-09-11 12:06:57 -07:00
parent 38d1831259
commit c298c73240
4 changed files with 72 additions and 6 deletions

View File

@@ -40,6 +40,15 @@ Revision.associate = (models) => {
);
};
Revision.findLatest = function (documentId) {
return Revision.findOne({
where: {
documentId,
},
order: [["createdAt", "DESC"]],
});
};
Revision.prototype.migrateVersion = function () {
let migrated = false;