diff --git a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/factories/standard-object.factory.ts b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/factories/standard-object.factory.ts index da2c8318b8fa..83c78d9d7598 100644 --- a/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/factories/standard-object.factory.ts +++ b/packages/twenty-server/src/engine/workspace-manager/workspace-sync-metadata/factories/standard-object.factory.ts @@ -1,12 +1,12 @@ import { Injectable } from '@nestjs/common'; -import { WorkspaceSyncContext } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/workspace-sync-context.interface'; -import { PartialWorkspaceEntity } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/partial-object-metadata.interface'; import { FeatureFlagMap } from 'src/engine/core-modules/feature-flag/interfaces/feature-flag-map.interface'; +import { PartialWorkspaceEntity } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/partial-object-metadata.interface'; +import { WorkspaceSyncContext } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/workspace-sync-context.interface'; -import { isGatedAndNotEnabled } from 'src/engine/workspace-manager/workspace-sync-metadata/utils/is-gate-and-not-enabled.util'; import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity'; import { metadataArgsStorage } from 'src/engine/twenty-orm/storage/metadata-args.storage'; +import { isGatedAndNotEnabled } from 'src/engine/workspace-manager/workspace-sync-metadata/utils/is-gate-and-not-enabled.util'; @Injectable() export class StandardObjectFactory { @@ -54,7 +54,7 @@ export class StandardObjectFactory { isCustom: false, isRemote: false, isSystem: workspaceEntityMetadataArgs.isSystem ?? false, - isSoftDeletable: workspaceEntityMetadataArgs.softDelete ?? false, + isSoftDeletable: workspaceEntityMetadataArgs.softDelete ?? true, }; } } diff --git a/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts b/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts index bfea234bb283..32e774d4ccd5 100644 --- a/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts +++ b/packages/twenty-server/src/modules/company/standard-objects/company.workspace-entity.ts @@ -40,7 +40,6 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta description: 'A company', icon: 'IconBuildingSkyscraper', labelIdentifierStandardId: COMPANY_STANDARD_FIELD_IDS.name, - softDelete: true, }) export class CompanyWorkspaceEntity extends BaseWorkspaceEntity { @WorkspaceField({ diff --git a/packages/twenty-server/src/modules/note/standard-objects/note-target.workspace-entity.ts b/packages/twenty-server/src/modules/note/standard-objects/note-target.workspace-entity.ts index 674fab9718a9..f4f260cea167 100644 --- a/packages/twenty-server/src/modules/note/standard-objects/note-target.workspace-entity.ts +++ b/packages/twenty-server/src/modules/note/standard-objects/note-target.workspace-entity.ts @@ -23,7 +23,6 @@ import { PersonWorkspaceEntity } from 'src/modules/person/standard-objects/perso labelPlural: 'Note Targets', description: 'A note target', icon: 'IconCheckbox', - softDelete: true, }) @WorkspaceIsSystem() export class NoteTargetWorkspaceEntity extends BaseWorkspaceEntity { diff --git a/packages/twenty-server/src/modules/note/standard-objects/note.workspace-entity.ts b/packages/twenty-server/src/modules/note/standard-objects/note.workspace-entity.ts index a8aa5b9342c4..7b5c9611885e 100644 --- a/packages/twenty-server/src/modules/note/standard-objects/note.workspace-entity.ts +++ b/packages/twenty-server/src/modules/note/standard-objects/note.workspace-entity.ts @@ -30,7 +30,6 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o description: 'A note', icon: 'IconNotes', labelIdentifierStandardId: NOTE_STANDARD_FIELD_IDS.title, - softDelete: true, }) export class NoteWorkspaceEntity extends BaseWorkspaceEntity { @WorkspaceField({ diff --git a/packages/twenty-server/src/modules/opportunity/standard-objects/opportunity.workspace-entity.ts b/packages/twenty-server/src/modules/opportunity/standard-objects/opportunity.workspace-entity.ts index 3acd4dc88ebd..142b000b9a0d 100644 --- a/packages/twenty-server/src/modules/opportunity/standard-objects/opportunity.workspace-entity.ts +++ b/packages/twenty-server/src/modules/opportunity/standard-objects/opportunity.workspace-entity.ts @@ -39,7 +39,6 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o description: 'An opportunity', icon: 'IconTargetArrow', labelIdentifierStandardId: OPPORTUNITY_STANDARD_FIELD_IDS.name, - softDelete: true, }) @WorkspaceIsNotAuditLogged() export class OpportunityWorkspaceEntity extends BaseWorkspaceEntity { diff --git a/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts b/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts index 4083e4a4b8ba..ac8aa9f628a5 100644 --- a/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts +++ b/packages/twenty-server/src/modules/person/standard-objects/person.workspace-entity.ts @@ -40,7 +40,6 @@ import { TimelineActivityWorkspaceEntity } from 'src/modules/timeline/standard-o icon: 'IconUser', labelIdentifierStandardId: PERSON_STANDARD_FIELD_IDS.name, imageIdentifierStandardId: PERSON_STANDARD_FIELD_IDS.avatarUrl, - softDelete: true, }) export class PersonWorkspaceEntity extends BaseWorkspaceEntity { @WorkspaceField({ diff --git a/packages/twenty-server/src/modules/task/standard-objects/task-target.workspace-entity.ts b/packages/twenty-server/src/modules/task/standard-objects/task-target.workspace-entity.ts index 394fcbb0c753..8f9cac2acaec 100644 --- a/packages/twenty-server/src/modules/task/standard-objects/task-target.workspace-entity.ts +++ b/packages/twenty-server/src/modules/task/standard-objects/task-target.workspace-entity.ts @@ -23,7 +23,6 @@ import { TaskWorkspaceEntity } from 'src/modules/task/standard-objects/task.work labelPlural: 'Task Targets', description: 'An task target', icon: 'IconCheckbox', - softDelete: true, }) @WorkspaceIsSystem() export class TaskTargetWorkspaceEntity extends BaseWorkspaceEntity { diff --git a/packages/twenty-server/src/modules/task/standard-objects/task.workspace-entity.ts b/packages/twenty-server/src/modules/task/standard-objects/task.workspace-entity.ts index d087d69c6fbd..03f0c88002e3 100644 --- a/packages/twenty-server/src/modules/task/standard-objects/task.workspace-entity.ts +++ b/packages/twenty-server/src/modules/task/standard-objects/task.workspace-entity.ts @@ -32,7 +32,6 @@ import { WorkspaceMemberWorkspaceEntity } from 'src/modules/workspace-member/sta description: 'A task', icon: 'IconCheckbox', labelIdentifierStandardId: TASK_STANDARD_FIELD_IDS.title, - softDelete: true, }) export class TaskWorkspaceEntity extends BaseWorkspaceEntity { @WorkspaceField({