From: Chocobozzz Date: Tue, 5 May 2020 14:34:50 +0000 (+0200) Subject: Fix playlist description length X-Git-Tag: v2.2.0-rc.1~84 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4c576aca1cb8652d88f6673f1d870b53654058d5;p=oweals%2Fpeertube.git Fix playlist description length --- 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 +}