mirror of https://github.com/status-im/codimd.git
Merge pull request #567 from ccoenen/fix-mysql-text-length
converting all content fields to MEDIUMTEXT (affects MySQL only)
This commit is contained in:
commit
af082d9347
|
@ -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})
|
||||
}
|
||||
}
|
|
@ -60,7 +60,7 @@ module.exports = function (sequelize, DataTypes) {
|
|||
}
|
||||
},
|
||||
content: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.TEXT('long'),
|
||||
get: function () {
|
||||
return sequelize.processData(this.getDataValue('content'), '')
|
||||
},
|
||||
|
|
|
@ -58,7 +58,7 @@ module.exports = function (sequelize, DataTypes) {
|
|||
defaultValue: Sequelize.UUIDV4
|
||||
},
|
||||
patch: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.TEXT('long'),
|
||||
get: function () {
|
||||
return sequelize.processData(this.getDataValue('patch'), '')
|
||||
},
|
||||
|
@ -67,7 +67,7 @@ module.exports = function (sequelize, DataTypes) {
|
|||
}
|
||||
},
|
||||
lastContent: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.TEXT('long'),
|
||||
get: function () {
|
||||
return sequelize.processData(this.getDataValue('lastContent'), '')
|
||||
},
|
||||
|
@ -76,7 +76,7 @@ module.exports = function (sequelize, DataTypes) {
|
|||
}
|
||||
},
|
||||
content: {
|
||||
type: DataTypes.TEXT,
|
||||
type: DataTypes.TEXT('long'),
|
||||
get: function () {
|
||||
return sequelize.processData(this.getDataValue('content'), '')
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue