Skip to content

Field and object metadata naming does not refer to v2#16187

Merged
Weiko merged 7 commits intomainfrom
rename-field-and-object-services
Nov 28, 2025
Merged

Field and object metadata naming does not refer to v2#16187
Weiko merged 7 commits intomainfrom
rename-field-and-object-services

Conversation

@prastoin
Copy link
Copy Markdown
Contributor

@prastoin prastoin commented Nov 28, 2025

@prastoin prastoin marked this pull request as ready for review November 28, 2025 16:29
@prastoin prastoin self-assigned this Nov 28, 2025
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Nov 28, 2025

Greptile Overview

Greptile Summary

This PR removes the "V2" suffix from field and object metadata service naming, bringing the codebase naming conventions in line with current standards. The changes include renaming two service files (field-metadata.service-v2.tsfield-metadata.service.ts, object-metadata-v2.service.tsobject-metadata.service.ts) and updating all 18 files that reference these services.

Key changes:

  • Renamed FieldMetadataServiceV2 class to FieldMetadataService
  • Renamed ObjectMetadataServiceV2 class to ObjectMetadataService
  • Updated all imports, dependency injections, and variable names from V2 naming to standard naming
  • Updated test files and mocks to reflect the new naming
  • All references across the codebase have been consistently updated

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a straightforward refactoring PR that only renames services and updates references without changing any logic. All imports, variable names, and test mocks have been consistently updated across all 18 files. No functional changes were made.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/twenty-server/src/engine/metadata-modules/field-metadata/services/field-metadata.service.ts 5/5 Renamed from field-metadata.service-v2.ts to field-metadata.service.ts, class renamed from FieldMetadataServiceV2 to FieldMetadataService
packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.module.ts 5/5 Updated all references from FieldMetadataServiceV2 to FieldMetadataService in imports, providers, and exports
packages/twenty-server/src/engine/metadata-modules/field-metadata/field-metadata.resolver.ts 5/5 Updated service injection and variable name from fieldMetadataServiceV2 to fieldMetadataService, cleaned up formatting
packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.service.ts 5/5 Renamed from object-metadata-v2.service.ts to object-metadata.service.ts, class renamed from ObjectMetadataServiceV2 to ObjectMetadataService
packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.module.ts 5/5 Updated all references from ObjectMetadataServiceV2 to ObjectMetadataService in imports, providers, and exports
packages/twenty-server/src/engine/metadata-modules/object-metadata/object-metadata.resolver.ts 5/5 Updated service injection and variable name from objectMetadataServiceV2 to objectMetadataService
packages/twenty-server/src/engine/core-modules/application/application-sync.service.ts 5/5 Updated service imports and variable names from V2 naming to standard naming for both field and object metadata services

Sequence Diagram

sequenceDiagram
    participant Resolver as Metadata Resolver
    participant Service as Metadata Service (renamed from V2)
    participant Cache as FlatEntityMaps Cache
    participant Migration as WorkspaceMigration Service
    participant DB as Database

    Note over Resolver,DB: Example: Creating Field Metadata

    Resolver->>Service: createOneField(input, workspaceId)
    Service->>Cache: getOrRecomputeFlatEntityMaps()
    Cache-->>Service: existing flat entity maps
    Service->>Service: validate and transform input
    Service->>Migration: validateBuildAndRunWorkspaceMigration()
    Migration->>DB: execute schema changes
    DB-->>Migration: migration complete
    Migration-->>Service: migration result
    Service->>Cache: invalidate cache
    Service-->>Resolver: created flat field metadata
    Resolver-->>Resolver: transform to DTO

    Note over Resolver,DB: This interaction pattern unchanged by rename
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 28, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:40291

This environment will automatically shut down when the PR is closed or after 5 hours.

Copy link
Copy Markdown
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🧹

@Weiko Weiko merged commit 9f62188 into main Nov 28, 2025
55 of 58 checks passed
@Weiko Weiko deleted the rename-field-and-object-services branch November 28, 2025 17:06
@twenty-eng-sync
Copy link
Copy Markdown

Hey @prastoin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants