fix: Migrate attachment columns to incease available length (#1704)

closes #1703
This commit is contained in:
Tom Moor 2020-12-06 16:51:25 -08:00 committed by GitHub
parent 424c29536d
commit ac2060b166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn(
"attachments",
"key",
{ type: Sequelize.STRING(4096), allowNull: false, }
);
await queryInterface.changeColumn(
"attachments",
"url",
{ type: Sequelize.STRING(4096), allowNull: false, }
);
},
down: async (queryInterface, Sequelize) => {
await queryInterface.changeColumn(
"attachments",
"key",
{ type: Sequelize.STRING(255), allowNull: false, }
);
await queryInterface.changeColumn(
"attachments",
"url",
{ type: Sequelize.STRING(255), allowNull: false, }
);
}
};