Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix pending job table migration

Chocobozzzf2e31d589c90
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 2d8087f46d..5395f744c7 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -24,7 +24,7 @@ import { CONFIG, registerConfigChangedHandler } from './config'
// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 665
+const LAST_MIGRATION_VERSION = 670
// ---------------------------------------------------------------------------
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 0000000000..7e9def1a0a
--- /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<void> {
+ 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
+}