From bb5e021f201c8ad83fe2736dee0faef123bfca50 Mon Sep 17 00:00:00 2001 From: Max Wu Date: Fri, 9 Feb 2018 21:27:06 +0800 Subject: Fix field type to prevent data truncation of authorship (#721) * Fix field type to prevent data truncation of authorship --- lib/migrations/20180209120907-longtext-of-authorship.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/migrations/20180209120907-longtext-of-authorship.js (limited to 'lib/migrations/20180209120907-longtext-of-authorship.js') diff --git a/lib/migrations/20180209120907-longtext-of-authorship.js b/lib/migrations/20180209120907-longtext-of-authorship.js new file mode 100644 index 00000000..4cca5444 --- /dev/null +++ b/lib/migrations/20180209120907-longtext-of-authorship.js @@ -0,0 +1,13 @@ +'use strict' + +module.exports = { + up: function (queryInterface, Sequelize) { + queryInterface.changeColumn('Notes', 'authorship', {type: Sequelize.TEXT('long')}) + queryInterface.changeColumn('Revisions', 'authorship', {type: Sequelize.TEXT('long')}) + }, + + down: function (queryInterface, Sequelize) { + queryInterface.changeColumn('Notes', 'authorship', {type: Sequelize.TEXT}) + queryInterface.changeColumn('Revisions', 'authorship', {type: Sequelize.TEXT}) + } +} -- cgit v1.2.3