From f482b459a960953bd64f0cbe3cfd7bf8d8374ed2 Mon Sep 17 00:00:00 2001 From: Marie <51697796+ijreilly@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:45:10 +0100 Subject: [PATCH] Remove workspace gates for aggregate fields metadata (#9125) As part of our rollout strategy, let's remove the workspaces gates, which will trigger the creation of the field metadatas needed for the aggregate queries features. In a later release we will remove the feature flag completely, after all fields have been created for all workspaces --- .../view/standard-objects/view-field.workspace-entity.ts | 5 ----- .../view/standard-objects/view.workspace-entity.ts | 8 -------- 2 files changed, 13 deletions(-) diff --git a/packages/twenty-server/src/modules/view/standard-objects/view-field.workspace-entity.ts b/packages/twenty-server/src/modules/view/standard-objects/view-field.workspace-entity.ts index fcd360978f94..66d14100bf88 100644 --- a/packages/twenty-server/src/modules/view/standard-objects/view-field.workspace-entity.ts +++ b/packages/twenty-server/src/modules/view/standard-objects/view-field.workspace-entity.ts @@ -3,13 +3,11 @@ import { registerEnumType } from '@nestjs/graphql'; import { Relation } from 'typeorm'; import { AGGREGATE_OPERATIONS } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant'; -import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { RelationMetadataType } from 'src/engine/metadata-modules/relation-metadata/relation-metadata.entity'; import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity'; import { WorkspaceEntity } from 'src/engine/twenty-orm/decorators/workspace-entity.decorator'; import { WorkspaceField } from 'src/engine/twenty-orm/decorators/workspace-field.decorator'; -import { WorkspaceGate } from 'src/engine/twenty-orm/decorators/workspace-gate.decorator'; import { WorkspaceIndex } from 'src/engine/twenty-orm/decorators/workspace-index.decorator'; import { WorkspaceIsNotAuditLogged } from 'src/engine/twenty-orm/decorators/workspace-is-not-audit-logged.decorator'; import { WorkspaceIsNullable } from 'src/engine/twenty-orm/decorators/workspace-is-nullable.decorator'; @@ -131,9 +129,6 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity { ], defaultValue: null, }) - @WorkspaceGate({ - featureFlag: FeatureFlagKey.IsAggregateQueryEnabled, - }) @WorkspaceIsNullable() aggregateOperation?: AGGREGATE_OPERATIONS | null; diff --git a/packages/twenty-server/src/modules/view/standard-objects/view.workspace-entity.ts b/packages/twenty-server/src/modules/view/standard-objects/view.workspace-entity.ts index f3d62cb706fb..bdbdb24f7903 100644 --- a/packages/twenty-server/src/modules/view/standard-objects/view.workspace-entity.ts +++ b/packages/twenty-server/src/modules/view/standard-objects/view.workspace-entity.ts @@ -1,7 +1,6 @@ import { Relation } from 'src/engine/workspace-manager/workspace-sync-metadata/interfaces/relation.interface'; import { AGGREGATE_OPERATIONS } from 'src/engine/api/graphql/graphql-query-runner/constants/aggregate-operations.constant'; -import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum'; import { FieldMetadataType } from 'src/engine/metadata-modules/field-metadata/field-metadata.entity'; import { RelationMetadataType, @@ -10,7 +9,6 @@ import { import { BaseWorkspaceEntity } from 'src/engine/twenty-orm/base.workspace-entity'; import { WorkspaceEntity } from 'src/engine/twenty-orm/decorators/workspace-entity.decorator'; import { WorkspaceField } from 'src/engine/twenty-orm/decorators/workspace-field.decorator'; -import { WorkspaceGate } from 'src/engine/twenty-orm/decorators/workspace-gate.decorator'; import { WorkspaceIsNotAuditLogged } from 'src/engine/twenty-orm/decorators/workspace-is-not-audit-logged.decorator'; import { WorkspaceIsNullable } from 'src/engine/twenty-orm/decorators/workspace-is-nullable.decorator'; import { WorkspaceIsSystem } from 'src/engine/twenty-orm/decorators/workspace-is-system.decorator'; @@ -223,9 +221,6 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity { ], defaultValue: `'${AGGREGATE_OPERATIONS.count}'`, }) - @WorkspaceGate({ - featureFlag: FeatureFlagKey.IsAggregateQueryEnabled, - }) @WorkspaceIsNullable() kanbanAggregateOperation?: AGGREGATE_OPERATIONS | null; @@ -236,9 +231,6 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity { description: 'Field metadata used for aggregate operation', defaultValue: null, }) - @WorkspaceGate({ - featureFlag: FeatureFlagKey.IsAggregateQueryEnabled, - }) @WorkspaceIsNullable() kanbanAggregateOperationFieldMetadataId?: string | null; }