From 5fb5f1e8b5f2ca957c7ddc62f60d9775b446beeb Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 3 Aug 2021 21:55:52 -0400 Subject: [PATCH] perf: Remove backup column migration (#2397) * perf: Remove no-longer-used 'backup' columns These were added as part of the move to the v2 editor over a year ago incase any text was not correctly converted. After a year of use no cases of failed conversion have occurred that required the use of this column * Remove migration, will do in 2-step release * perf: Remove no-longer-used 'backup' columns These were added as part of the move to the v2 editor over a year ago incase any text was not correctly converted. After a year of use no cases of failed conversion have occurred that required the use of this column --- .../20210730044247-remove-backup-column.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 server/migrations/20210730044247-remove-backup-column.js diff --git a/server/migrations/20210730044247-remove-backup-column.js b/server/migrations/20210730044247-remove-backup-column.js new file mode 100644 index 000000000..3f2ec872a --- /dev/null +++ b/server/migrations/20210730044247-remove-backup-column.js @@ -0,0 +1,19 @@ +'use strict'; + +module.exports = { + up: async (queryInterface, Sequelize) => { + await queryInterface.removeColumn('documents', 'backup'); + await queryInterface.removeColumn('revisions', 'backup'); + }, + + down: async (queryInterface, Sequelize) => { + await queryInterface.addColumn('documents', 'backup', { + type: Sequelize.TEXT, + allowNull: true, + }); + await queryInterface.addColumn('revisions', 'backup', { + type: Sequelize.TEXT, + allowNull: true, + }); + } +}; \ No newline at end of file