feat: Ensure that editorVersion is saved with document/revisions (#1212)

This commit is contained in:
Tom Moor
2020-03-16 08:30:23 -07:00
committed by GitHub
parent 4851f51d8b
commit f0be9beeb4
5 changed files with 29 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ const createRevision = (doc, options = {}) => {
title: doc.title,
text: doc.text,
userId: doc.lastModifiedById,
editorVersion: doc.editorVersion,
documentId: doc.id,
},
{
@@ -91,6 +92,7 @@ const Document = sequelize.define(
},
},
},
editorVersion: DataTypes.STRING,
text: DataTypes.TEXT,
isWelcome: { type: DataTypes.BOOLEAN, defaultValue: false },
revisionCount: { type: DataTypes.INTEGER, defaultValue: 0 },