Skip to content

Commit

Permalink
Remove workspace gates for aggregate fields metadata (#9125)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ijreilly authored Dec 18, 2024
1 parent baf3395 commit f482b45
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -131,9 +129,6 @@ export class ViewFieldWorkspaceEntity extends BaseWorkspaceEntity {
],
defaultValue: null,
})
@WorkspaceGate({
featureFlag: FeatureFlagKey.IsAggregateQueryEnabled,
})
@WorkspaceIsNullable()
aggregateOperation?: AGGREGATE_OPERATIONS | null;

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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';
Expand Down Expand Up @@ -223,9 +221,6 @@ export class ViewWorkspaceEntity extends BaseWorkspaceEntity {
],
defaultValue: `'${AGGREGATE_OPERATIONS.count}'`,
})
@WorkspaceGate({
featureFlag: FeatureFlagKey.IsAggregateQueryEnabled,
})
@WorkspaceIsNullable()
kanbanAggregateOperation?: AGGREGATE_OPERATIONS | null;

Expand All @@ -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;
}

0 comments on commit f482b45

Please sign in to comment.