From f2e31d589c900c0c79e74b8eb29a98384d9e6fc0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 30 Aug 2021 16:28:36 +0200 Subject: Fix pending job table migration --- .../migrations/0670-pending-job-default.ts | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 server/initializers/migrations/0670-pending-job-default.ts (limited to 'server/initializers/migrations') diff --git a/server/initializers/migrations/0670-pending-job-default.ts b/server/initializers/migrations/0670-pending-job-default.ts new file mode 100644 index 000000000..7e9def1a0 --- /dev/null +++ b/server/initializers/migrations/0670-pending-job-default.ts @@ -0,0 +1,27 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction + queryInterface: Sequelize.QueryInterface + sequelize: Sequelize.Sequelize + db: any +}): Promise { + for (const column of [ 'pendingMove', 'pendingTranscode' ]) { + const data = { + type: Sequelize.INTEGER, + allowNull: false, + defaultValue: 0 + } + + await utils.queryInterface.changeColumn('videoJobInfo', column, data) + } +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- cgit v1.2.3