From 4c576aca1cb8652d88f6673f1d870b53654058d5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 5 May 2020 16:34:50 +0200 Subject: [PATCH] Fix playlist description length --- server/initializers/constants.ts | 2 +- .../0500-playlist-description-length.ts | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 server/initializers/migrations/0500-playlist-description-length.ts diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 5ce8819ec..d583912fb 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -14,7 +14,7 @@ import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 495 +const LAST_MIGRATION_VERSION = 500 // --------------------------------------------------------------------------- diff --git a/server/initializers/migrations/0500-playlist-description-length.ts b/server/initializers/migrations/0500-playlist-description-length.ts new file mode 100644 index 000000000..f47f3d96a --- /dev/null +++ b/server/initializers/migrations/0500-playlist-description-length.ts @@ -0,0 +1,26 @@ +import * as Sequelize from 'sequelize' + +async function up (utils: { + transaction: Sequelize.Transaction + queryInterface: Sequelize.QueryInterface + sequelize: Sequelize.Sequelize +}): Promise { + + { + const description = { + type: Sequelize.STRING(1000), + allowNull: true + } + await utils.queryInterface.changeColumn('videoPlaylist', 'description', description) + } + +} + +function down (options) { + throw new Error('Not implemented.') +} + +export { + up, + down +} -- 2.25.1