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

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, }
);
}
};