mirror of
https://github.com/strapi/strapi.git
synced 2025-10-26 23:51:10 +00:00
Remove PG Magic Numbers
This commit is contained in:
parent
d36609ff26
commit
dc784812ac
@ -16,8 +16,16 @@ class PostgresDialect extends Dialect {
|
||||
}
|
||||
|
||||
async initialize() {
|
||||
this.db.connection.client.driver.types.setTypeParser(1082, 'text', (v) => v); // Don't cast DATE string to Date()
|
||||
this.db.connection.client.driver.types.setTypeParser(1700, 'text', parseFloat);
|
||||
this.db.connection.client.driver.types.setTypeParser(
|
||||
this.db.connection.client.driver.types.builtins.DATE,
|
||||
'text',
|
||||
(v) => v
|
||||
); // Don't cast DATE string to Date()
|
||||
this.db.connection.client.driver.types.setTypeParser(
|
||||
this.db.connection.client.driver.types.builtins.NUMERIC,
|
||||
'text',
|
||||
parseFloat
|
||||
);
|
||||
}
|
||||
|
||||
usesForeignKeys() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user