From: Chocobozzz Date: Mon, 11 Feb 2019 10:55:11 +0000 (+0100) Subject: Update migration version for download enabled X-Git-Tag: v1.3.0-rc.1~205^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=25451e08c71b81ee3da75d65eab22445a78dd0c2;p=oweals%2Fpeertube.git Update migration version for download enabled --- diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index e5c4c4e63..639493d73 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -16,7 +16,7 @@ let config: IConfig = require('config') // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 330 +const LAST_MIGRATION_VERSION = 335 // --------------------------------------------------------------------------- diff --git a/server/initializers/migrations/0280-video-downloading-enabled.ts b/server/initializers/migrations/0280-video-downloading-enabled.ts deleted file mode 100644 index e79466447..000000000 --- a/server/initializers/migrations/0280-video-downloading-enabled.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as Sequelize from 'sequelize' -import { Migration } from '../../models/migrations' - -async function up (utils: { - transaction: Sequelize.Transaction, - queryInterface: Sequelize.QueryInterface, - sequelize: Sequelize.Sequelize -}): Promise { - const data = { - type: Sequelize.BOOLEAN, - allowNull: false, - defaultValue: true - } as Migration.Boolean - await utils.queryInterface.addColumn('video', 'downloadEnabled', data) - - data.defaultValue = null - return utils.queryInterface.changeColumn('video', 'downloadEnabled', data) -} - -function down (options) { - throw new Error('Not implemented.') -} - -export { - up, - down -} diff --git a/server/initializers/migrations/0335-video-downloading-enabled.ts b/server/initializers/migrations/0335-video-downloading-enabled.ts new file mode 100644 index 000000000..e79466447 --- /dev/null +++ b/server/initializers/migrations/0335-video-downloading-enabled.ts @@ -0,0 +1,27 @@ +import * as Sequelize from 'sequelize' +import { Migration } from '../../models/migrations' + +async function up (utils: { + transaction: Sequelize.Transaction, + queryInterface: Sequelize.QueryInterface, + sequelize: Sequelize.Sequelize +}): Promise { + const data = { + type: Sequelize.BOOLEAN, + allowNull: false, + defaultValue: true + } as Migration.Boolean + await utils.queryInterface.addColumn('video', 'downloadEnabled', data) + + data.defaultValue = null + return utils.queryInterface.changeColumn('video', 'downloadEnabled', data) +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +}