Fix #521 by converting content fields to LONGTEXT in MySQL, to prevent truncation of data.
This commit is contained in:
16
lib/migrations/20171009121200-longtext-for-mysql.js
Normal file
16
lib/migrations/20171009121200-longtext-for-mysql.js
Normal file
@@ -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})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user