Simplify ORM (#6373)

This PR refactors the ORM-Manager to simplify and unify the datasource
creation. I'm deprecating all usages if InjectWorkspaceDatasource and
InjectWorkspaceRepository as we can't be sure they are up-to-date
This commit is contained in:
Charles Bochet
2024-07-23 14:13:16 +02:00
committed by GitHub
parent 794e73eeb6
commit 6c34ef9a14
23 changed files with 205 additions and 1672 deletions
@@ -183,9 +183,9 @@ export class MigrateLinkFieldsToLinksCommand extends CommandRunner {
});
const viewFieldRepository =
await this.twentyORMGlobalManager.getRepositoryForWorkspace(
await this.twentyORMGlobalManager.getRepositoryForWorkspace<ViewFieldWorkspaceEntity>(
workspaceId,
ViewFieldWorkspaceEntity,
'viewField',
);
const viewFieldsWithDeprecatedField =
await viewFieldRepository.find({