From 0374b6b5cd685316f924874b2a3068bb345eb0dd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Jan 2020 14:45:17 +0100 Subject: Cleanup server fixme --- server/models/video/video-channel.ts | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'server/models/video/video-channel.ts') diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index e10adcb3a..4e98e7ba3 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -43,18 +43,6 @@ import { MChannelSummaryFormattable } from '../../typings/models/video' -// FIXME: Define indexes here because there is an issue with TS and Sequelize.literal when called directly in the annotation -const indexes: ModelIndexesOptions[] = [ - buildTrigramSearchIndex('video_channel_name_trigram', 'name'), - - { - fields: [ 'accountId' ] - }, - { - fields: [ 'actorId' ] - } -] - export enum ScopeNames { FOR_API = 'FOR_API', WITH_ACCOUNT = 'WITH_ACCOUNT', @@ -176,7 +164,16 @@ export type SummaryOptions = { })) @Table({ tableName: 'videoChannel', - indexes + indexes: [ + buildTrigramSearchIndex('video_channel_name_trigram', 'name'), + + { + fields: [ 'accountId' ] + }, + { + fields: [ 'actorId' ] + } + ] }) export class VideoChannelModel extends Model { -- cgit v1.2.3