From 25451e08c71b81ee3da75d65eab22445a78dd0c2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 11 Feb 2019 11:55:11 +0100 Subject: Update migration version for download enabled --- server/initializers/constants.ts | 2 +- .../migrations/0280-video-downloading-enabled.ts | 27 ---------------------- .../migrations/0335-video-downloading-enabled.ts | 27 ++++++++++++++++++++++ 3 files changed, 28 insertions(+), 28 deletions(-) delete mode 100644 server/initializers/migrations/0280-video-downloading-enabled.ts create mode 100644 server/initializers/migrations/0335-video-downloading-enabled.ts (limited to 'server/initializers') 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 +} -- cgit v1.2.3