Update workspace entities to make all TEXT nullable (#16144)

Follow up on #15926

---------

Co-authored-by: Etienne <45695613+etiennejouan@users.noreply.github.com>
Co-authored-by: guillim <guigloo@msn.com>
This commit is contained in:
Charles Bochet
2025-11-28 10:50:38 +01:00
committed by GitHub
parent 9620a4b0ba
commit eb362c6d5f
63 changed files with 396 additions and 136 deletions
@@ -146,7 +146,8 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Handle`,
icon: 'IconAt',
})
handle: string;
@WorkspaceIsNullable()
handle: string | null;
@WorkspaceField({
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.type,
@@ -304,7 +305,8 @@ export class MessageChannelWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Last sync cursor`,
icon: 'IconHistory',
})
syncCursor: string;
@WorkspaceIsNullable()
syncCursor: string | null;
@WorkspaceField({
standardId: MESSAGE_CHANNEL_STANDARD_FIELD_IDS.syncedAt,
@@ -1,9 +1,9 @@
import { registerEnumType } from '@nestjs/graphql';
import { msg } from '@lingui/core/macro';
import { STANDARD_OBJECT_IDS } from 'twenty-shared/metadata';
import { FieldMetadataType, RelationOnDeleteAction } from 'twenty-shared/types';
import { Relation } from 'typeorm';
import { STANDARD_OBJECT_IDS } from 'twenty-shared/metadata';
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
@@ -47,7 +47,8 @@ export class MessageFolderWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Folder name`,
icon: 'IconFolder',
})
name: string;
@WorkspaceIsNullable()
name: string | null;
@WorkspaceRelation({
standardId: MESSAGE_FOLDER_STANDARD_FIELD_IDS.messageChannel,
@@ -68,7 +69,8 @@ export class MessageFolderWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Sync Cursor`,
icon: 'IconHash',
})
syncCursor: string;
@WorkspaceIsNullable()
syncCursor: string | null;
@WorkspaceField({
standardId: MESSAGE_FOLDER_STANDARD_FIELD_IDS.isSentFolder,
@@ -1,6 +1,6 @@
import { msg } from '@lingui/core/macro';
import { FieldMetadataType, RelationOnDeleteAction } from 'twenty-shared/types';
import { STANDARD_OBJECT_IDS } from 'twenty-shared/metadata';
import { FieldMetadataType, RelationOnDeleteAction } from 'twenty-shared/types';
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
@@ -55,7 +55,8 @@ export class MessageParticipantWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Handle`,
icon: 'IconAt',
})
handle: string;
@WorkspaceIsNullable()
handle: string | null;
@WorkspaceField({
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.displayName,
@@ -64,7 +65,8 @@ export class MessageParticipantWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Display Name`,
icon: 'IconUser',
})
displayName: string;
@WorkspaceIsNullable()
displayName: string | null;
@WorkspaceRelation({
standardId: MESSAGE_PARTICIPANT_STANDARD_FIELD_IDS.message,
@@ -1,6 +1,6 @@
import { msg } from '@lingui/core/macro';
import { FieldMetadataType, RelationOnDeleteAction } from 'twenty-shared/types';
import { STANDARD_OBJECT_IDS } from 'twenty-shared/metadata';
import { FieldMetadataType, RelationOnDeleteAction } from 'twenty-shared/types';
import { RelationType } from 'src/engine/metadata-modules/field-metadata/interfaces/relation-type.interface';
import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface';
@@ -39,7 +39,8 @@ export class MessageWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Message id from the message header`,
icon: 'IconHash',
})
headerMessageId: string;
@WorkspaceIsNullable()
headerMessageId: string | null;
@WorkspaceField({
standardId: MESSAGE_STANDARD_FIELD_IDS.subject,
@@ -48,7 +49,8 @@ export class MessageWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Subject`,
icon: 'IconMessage',
})
subject: string;
@WorkspaceIsNullable()
subject: string | null;
@WorkspaceField({
standardId: MESSAGE_STANDARD_FIELD_IDS.text,
@@ -57,7 +59,8 @@ export class MessageWorkspaceEntity extends BaseWorkspaceEntity {
description: msg`Text`,
icon: 'IconMessage',
})
text: string;
@WorkspaceIsNullable()
text: string | null;
@WorkspaceField({
standardId: MESSAGE_STANDARD_FIELD_IDS.receivedAt,