Switch timestamp to timestamptz (#4696)

* Switch timestamps to timestamptz

* update standard/custom objects logic to use timestamptz

* fix test
This commit is contained in:
Weiko
2024-03-28 22:39:41 +01:00
committed by GitHub
parent 27fdb00d07
commit 1829f4d009
21 changed files with 209 additions and 79 deletions

View File

@ -4,7 +4,7 @@ import { getFieldMetadataType } from 'src/engine/api/graphql/workspace-schema-bu
describe('getFieldMetadataType', () => {
it.each([
['uuid', FieldMetadataType.UUID],
['timestamp', FieldMetadataType.DATE_TIME],
['timestamptz', FieldMetadataType.DATE_TIME],
])(
'should return correct FieldMetadataType for type %s',
(type, expectedMetadataType) => {

View File

@ -2,7 +2,7 @@ import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/fi
const typeOrmTypeMapping = new Map<string, FieldMetadataType>([
['uuid', FieldMetadataType.UUID],
['timestamp', FieldMetadataType.DATE_TIME],
['timestamptz', FieldMetadataType.DATE_TIME],
// Add more types here if we need to support more than id, and createdAt/updatedAt/deletedAt
]);