From b49f22d8f9a52ab75fd38db2d377249eb58fa678 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Dec 2020 14:30:29 +0100 Subject: Upgrade sequelize to v6 --- server/models/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/models/utils.ts') diff --git a/server/models/utils.ts b/server/models/utils.ts index a06d57831..143c1a23c 100644 --- a/server/models/utils.ts +++ b/server/models/utils.ts @@ -113,7 +113,8 @@ function throwIfNotValid (value: any, validator: (value: any) => boolean, fieldN function buildTrigramSearchIndex (indexName: string, attribute: string) { return { name: indexName, - fields: [ Sequelize.literal('lower(immutable_unaccent(' + attribute + '))') as any ], + // FIXME: gin_trgm_ops is not taken into account in Sequelize 6, so adding it ourselves in the literal function + fields: [ Sequelize.literal('lower(immutable_unaccent(' + attribute + ')) gin_trgm_ops') as any ], using: 'gin', operator: 'gin_trgm_ops' } -- cgit v1.2.3