From 09cbdb0a9b664e47e959c4476381afcaf9d98668 Mon Sep 17 00:00:00 2001 From: Marie Stoppa Date: Tue, 30 Jul 2024 11:03:26 +0200 Subject: [PATCH] Set size for new viewField --- .../0-23/0-23-migrate-domain-to-links.command.ts | 1 + .../twenty-server/src/modules/view/services/view.service.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-migrate-domain-to-links.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-migrate-domain-to-links.command.ts index e35973f0d69a..daabf671dfc9 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-migrate-domain-to-links.command.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version/0-23/0-23-migrate-domain-to-links.command.ts @@ -188,6 +188,7 @@ export class MigrateDomainNameFromTextToLinksCommand extends CommandRunner { }, [], ), + size: 150, }); // Delete initial domainName text field diff --git a/packages/twenty-server/src/modules/view/services/view.service.ts b/packages/twenty-server/src/modules/view/services/view.service.ts index 4228ea127353..ed34f8e81dc4 100644 --- a/packages/twenty-server/src/modules/view/services/view.service.ts +++ b/packages/twenty-server/src/modules/view/services/view.service.ts @@ -17,6 +17,7 @@ export class ViewService { fieldId, viewsIds, positions, + size, }: { workspaceId: string; fieldId: string; @@ -24,6 +25,7 @@ export class ViewService { positions?: { [key: string]: number; }[]; + size?: number; }) { const viewFieldRepository = await this.twentyORMGlobalManager.getRepositoryForWorkspace( @@ -51,6 +53,7 @@ export class ViewService { fieldMetadataId: fieldId, isVisible: true, ...(isDefined(position) && { position: position }), + ...(isDefined(size) && { size: size }), }); await viewFieldRepository.save(newViewField);