diff --git a/server/postgres/src/utils.ts b/server/postgres/src/utils.ts index 39b2bb4a0e..e4a5679e5a 100644 --- a/server/postgres/src/utils.ts +++ b/server/postgres/src/utils.ts @@ -307,6 +307,12 @@ export function inferType (val: any): string { } } if (typeof val === 'object') { + if (val == null) { + return '' + } + if (val instanceof Date) { + return '::text' + } return '::jsonb' } return ''