From db6c2477996690052638b8c44b848969111df222 Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Fri, 8 Nov 2024 15:55:47 +0500 Subject: [PATCH] Fix github pg (#7135) Signed-off-by: Denis Bykhov --- server/postgres/src/utils.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/postgres/src/utils.ts b/server/postgres/src/utils.ts index 239aff7cf5..39b2bb4a0e 100644 --- a/server/postgres/src/utils.ts +++ b/server/postgres/src/utils.ts @@ -302,7 +302,12 @@ export function inferType (val: any): string { } if (Array.isArray(val)) { const type = inferType(val[0]) - return type + '[]' + if (type !== '') { + return type + '[]' + } + } + if (typeof val === 'object') { + return '::jsonb' } return '' }