From 68466f6f0911cc5b0d17d829c7ab075ad9e5e07a Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Thu, 1 Sep 2022 10:36:10 +0200 Subject: [PATCH] fix: Change data type of history attribute in user table to long text When using mysql the normal text attribute has a fixed size. When this size is reached then the json will be cut off and becomes invalid. Signed-off-by: Tilman Vatteroth --- .../20220901102800-convert-history-to-longtext.js | 6 ++++++ public/docs/release-notes.md | 1 + 2 files changed, 7 insertions(+) diff --git a/lib/migrations/20220901102800-convert-history-to-longtext.js b/lib/migrations/20220901102800-convert-history-to-longtext.js index 75e3e58a5..b17fe9c67 100644 --- a/lib/migrations/20220901102800-convert-history-to-longtext.js +++ b/lib/migrations/20220901102800-convert-history-to-longtext.js @@ -5,5 +5,11 @@ module.exports = { return queryInterface.changeColumn('Users', 'history', { type: Sequelize.TEXT('long') }) + }, + + down: function (queryInterface, Sequelize) { + return queryInterface.changeColumn('Users', 'history', { + type: Sequelize.TEXT + }) } } diff --git a/public/docs/release-notes.md b/public/docs/release-notes.md index 3e959e963..baea12718 100644 --- a/public/docs/release-notes.md +++ b/public/docs/release-notes.md @@ -7,6 +7,7 @@ ### Bugfixes - Fix a crash when using LDAP authentication with custom search attributes (thanks to [@aboettger-tuhh](https://github.com/aboettger-tuhh) for reporting) +- Fix crash caused by a long note history when the MySQL database is used ## 1.9.4 2022-07-10