summaryrefslogtreecommitdiff
path: root/lib/migrations
diff options
context:
space:
mode:
authorClaudius Coenen2017-10-16 10:12:39 +0200
committerClaudius Coenen2017-10-16 10:13:11 +0200
commitcc49ce55c8fdc5237d1b45c75df991cb958b46d9 (patch)
treeb62fa02124a488742f67743a5ec123097f6636f7 /lib/migrations
parent5ce8f40eac7fccfcfca175cf79ccfa86a84bc113 (diff)
Fix #521 by converting content fields to LONGTEXT in MySQL, to prevent truncation of data.
Diffstat (limited to '')
-rw-r--r--lib/migrations/20171009121200-longtext-for-mysql.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/migrations/20171009121200-longtext-for-mysql.js b/lib/migrations/20171009121200-longtext-for-mysql.js
new file mode 100644
index 00000000..61b409ca
--- /dev/null
+++ b/lib/migrations/20171009121200-longtext-for-mysql.js
@@ -0,0 +1,16 @@
+'use strict'
+module.exports = {
+ up: function (queryInterface, Sequelize) {
+ queryInterface.changeColumn('Notes', 'content', {type: Sequelize.TEXT('long')})
+ queryInterface.changeColumn('Revisions', 'patch', {type: Sequelize.TEXT('long')})
+ queryInterface.changeColumn('Revisions', 'content', {type: Sequelize.TEXT('long')})
+ queryInterface.changeColumn('Revisions', 'latContent', {type: Sequelize.TEXT('long')})
+ },
+
+ down: function (queryInterface, Sequelize) {
+ queryInterface.changeColumn('Notes', 'content', {type: Sequelize.TEXT})
+ queryInterface.changeColumn('Revisions', 'patch', {type: Sequelize.TEXT})
+ queryInterface.changeColumn('Revisions', 'content', {type: Sequelize.TEXT})
+ queryInterface.changeColumn('Revisions', 'latContent', {type: Sequelize.TEXT})
+ }
+}