SIGN IN SIGN UP

Rename the legacy schema service and fold the v2 ORM module (#24761)

## What

First of the five PRs splitting #24759 (kept closed as reference), which
itself was the last third of #24745. Two tiny preparatory changes with
no ORM behavior content:

- **Rename the legacy `WorkspaceDataSourceService` to
`WorkspaceSchemaService`.** The service in `engine/workspace-datasource`
is the pre-v1 schema-lifecycle layer (create and delete the workspace
Postgres schema, plus a raw query used by the two remaining legacy
repositories). Renaming it frees the natural
`WorkspaceDataSourceService` name for the v2 datasource service, which
picks it up when the suffixes drop in a later PR of this sequence.
- **Fold `TwentyORMV2Module` into `GlobalWorkspaceDataSourceModule`.**
Its only provider was `WorkspaceDataSourceV2Service`; the global module
(which already imported it) now provides and exports the service
directly, and the three feature modules that imported the v2 module drop
the import.

## Coming next (in sequence, each after the previous merges)

1. Move `twenty-orm-v2/` into `twenty-orm/`, paths only, no identifier
changes.
2. Drop the `V2` suffix from the core classes (repository, query
builders, datasource, executor).
3. Rename `GlobalWorkspaceOrmManager` to `WorkspaceOrmManager` and the
module to `TwentyOrmModule`.
4. Rename the internal leftovers (find-option types, contexts, group-by
service, README sweep).

## Verification

- `tsgo --noEmit` clean, `oxlint --type-aware` and `oxfmt --check src/`
clean
- Schema-service and scoped-repository unit suites pass
- Behavior neutral: a class rename and a module fold with identical
providers


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/twentyhq/twenty/pull/24761?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
C
Charles Bochet committed
29868e209612cd9c98bb89757e2bb94dc069834e
Parent: 95ea62c
Committed by GitHub <noreply@github.com> on 8/25/2026, 2:08:25 PM