diff --git a/server/migrations/20201206210619-update-attachment-cols.js b/server/migrations/20201206210619-update-attachment-cols.js new file mode 100644 index 00000000..1cacacdf --- /dev/null +++ b/server/migrations/20201206210619-update-attachment-cols.js @@ -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, } + ); + } +};