From 9254c0dc39472f39dda432e29df682254f5186c6 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Thu, 1 Sep 2022 10:31:16 +0200 Subject: [PATCH] Convert history attribute in user table to longtext Signed-off-by: Tilman Vatteroth --- .../20220901102800-convert-history-to-longtext.js | 9 +++++++++ lib/models/user.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 lib/migrations/20220901102800-convert-history-to-longtext.js diff --git a/lib/migrations/20220901102800-convert-history-to-longtext.js b/lib/migrations/20220901102800-convert-history-to-longtext.js new file mode 100644 index 000000000..75e3e58a5 --- /dev/null +++ b/lib/migrations/20220901102800-convert-history-to-longtext.js @@ -0,0 +1,9 @@ +'use strict' + +module.exports = { + up: function (queryInterface, Sequelize) { + return queryInterface.changeColumn('Users', 'history', { + type: Sequelize.TEXT('long') + }) + } +} diff --git a/lib/models/user.js b/lib/models/user.js index 5532e5b31..ff1547458 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -23,7 +23,7 @@ module.exports = function (sequelize, DataTypes) { type: DataTypes.TEXT }, history: { - type: DataTypes.TEXT + type: DataTypes.TEXT('long') }, accessToken: { type: DataTypes.TEXT