From 2735a154dc77316e584bc784c65e904df791067f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 17 Dec 2019 09:55:33 +0100 Subject: Fix video import with long thumbnail url --- server/models/video/thumbnail.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'server/models') diff --git a/server/models/video/thumbnail.ts b/server/models/video/thumbnail.ts index f1952dcc1..e68a6711f 100644 --- a/server/models/video/thumbnail.ts +++ b/server/models/video/thumbnail.ts @@ -1,6 +1,18 @@ import { join } from 'path' -import { AfterDestroy, AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Model, Table, UpdatedAt } from 'sequelize-typescript' -import { LAZY_STATIC_PATHS, STATIC_PATHS, WEBSERVER } from '../../initializers/constants' +import { + AfterDestroy, + AllowNull, + BelongsTo, + Column, + CreatedAt, + DataType, + Default, + ForeignKey, + Model, + Table, + UpdatedAt +} from 'sequelize-typescript' +import { CONSTRAINTS_FIELDS, LAZY_STATIC_PATHS, STATIC_PATHS, WEBSERVER } from '../../initializers/constants' import { logger } from '../../helpers/logger' import { remove } from 'fs-extra' import { CONFIG } from '../../initializers/config' @@ -41,7 +53,7 @@ export class ThumbnailModel extends Model { type: ThumbnailType @AllowNull(true) - @Column + @Column(DataType.STRING(CONSTRAINTS_FIELDS.COMMONS.URL.max)) fileUrl: string @AllowNull(true) -- cgit v1.2.3