diff options
author | Claudius Coenen | 2017-10-16 10:12:39 +0200 |
---|---|---|
committer | Claudius Coenen | 2017-10-16 10:13:11 +0200 |
commit | cc49ce55c8fdc5237d1b45c75df991cb958b46d9 (patch) | |
tree | b62fa02124a488742f67743a5ec123097f6636f7 /lib/models | |
parent | 5ce8f40eac7fccfcfca175cf79ccfa86a84bc113 (diff) |
Fix #521 by converting content fields to LONGTEXT in MySQL, to prevent truncation of data.
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/note.js | 2 | ||||
-rw-r--r-- | lib/models/revision.js | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/models/note.js b/lib/models/note.js index c0ef1374..33dde80d 100644 --- a/lib/models/note.js +++ b/lib/models/note.js @@ -60,7 +60,7 @@ module.exports = function (sequelize, DataTypes) { } }, content: { - type: DataTypes.TEXT, + type: DataTypes.TEXT('long'), get: function () { return sequelize.processData(this.getDataValue('content'), '') }, diff --git a/lib/models/revision.js b/lib/models/revision.js index 225a95d4..32c57d03 100644 --- a/lib/models/revision.js +++ b/lib/models/revision.js @@ -58,7 +58,7 @@ module.exports = function (sequelize, DataTypes) { defaultValue: Sequelize.UUIDV4 }, patch: { - type: DataTypes.TEXT, + type: DataTypes.TEXT('long'), get: function () { return sequelize.processData(this.getDataValue('patch'), '') }, @@ -67,7 +67,7 @@ module.exports = function (sequelize, DataTypes) { } }, lastContent: { - type: DataTypes.TEXT, + type: DataTypes.TEXT('long'), get: function () { return sequelize.processData(this.getDataValue('lastContent'), '') }, @@ -76,7 +76,7 @@ module.exports = function (sequelize, DataTypes) { } }, content: { - type: DataTypes.TEXT, + type: DataTypes.TEXT('long'), get: function () { return sequelize.processData(this.getDataValue('content'), '') }, |