aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-08 14:30:29 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-09 11:41:22 +0100
commitb49f22d8f9a52ab75fd38db2d377249eb58fa678 (patch)
treea2825877d7b3b53454804a79c9d2a14c5d37385c /server/models/utils.ts
parent6c8c15f914cd375da1db5d0cd4d924a86c53d4c1 (diff)
downloadPeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.gz
PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.tar.zst
PeerTube-b49f22d8f9a52ab75fd38db2d377249eb58fa678.zip
Upgrade sequelize to v6
Diffstat (limited to 'server/models/utils.ts')
-rw-r--r--server/models/utils.ts3
1 files changed, 2 insertions, 1 deletions
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
113function buildTrigramSearchIndex (indexName: string, attribute: string) { 113function buildTrigramSearchIndex (indexName: string, attribute: string) {
114 return { 114 return {
115 name: indexName, 115 name: indexName,
116 fields: [ Sequelize.literal('lower(immutable_unaccent(' + attribute + '))') as any ], 116 // FIXME: gin_trgm_ops is not taken into account in Sequelize 6, so adding it ourselves in the literal function
117 fields: [ Sequelize.literal('lower(immutable_unaccent(' + attribute + ')) gin_trgm_ops') as any ],
117 using: 'gin', 118 using: 'gin',
118 operator: 'gin_trgm_ops' 119 operator: 'gin_trgm_ops'
119 } 120 }