don't automatically parse jsonb fields on postgres

This commit is contained in:
Fernando Chavez 2023-08-10 09:39:03 +02:00
parent ba1b99b408
commit e5d9b62f9b

View File

@ -22,6 +22,12 @@ class PostgresDialect extends Dialect {
'text',
(v) => v
);
// Don't parse JSONB automatically
this.db.connection.client.driver.types.setTypeParser(
this.db.connection.client.driver.types.builtins.JSONB,
'text',
(v) => v
);
this.db.connection.client.driver.types.setTypeParser(
this.db.connection.client.driver.types.builtins.NUMERIC,
'text',