summaryrefslogtreecommitdiff
path: root/lib/migrations
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-01-18 11:16:59 +0100
committerGitHub2018-01-18 11:16:59 +0100
commitaf082d934761cbc72c14293376f7c2df2367e6b7 (patch)
treef3027423e1aab6b3599574321b8685b78fef2828 /lib/migrations
parent9219a9b48c9f08919fc15b6b5a07ba8660125e3f (diff)
parentcc49ce55c8fdc5237d1b45c75df991cb958b46d9 (diff)
Merge pull request #567 from ccoenen/fix-mysql-text-length
converting all content fields to MEDIUMTEXT (affects MySQL only)
Diffstat (limited to 'lib/migrations')
-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})
+ }
+}