From 4232e3a4deb2ecdfdca2d61bf100c352c76fbf9b Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Wed, 20 Nov 2024 16:33:14 +0100 Subject: [PATCH 1/2] refactor(workspaces): Rename SEED_TWENTY_WORKSPACE_ID to SEED_ACME_WORKSPACE_ID Updated workspace ID and corresponding details to SEED_ACME_WORKSPACE_ID across multiple files. This change reflects the new naming convention and ensures consistency within our seed data. --- .../commands/data-seed-dev-workspace.command.ts | 4 ++-- .../src/database/typeorm-seeds/core/userWorkspaces.ts | 4 ++-- .../src/database/typeorm-seeds/core/workspaces.ts | 10 +++++----- .../typeorm-seeds/workspace/workspace-members.ts | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/twenty-server/src/database/commands/data-seed-dev-workspace.command.ts b/packages/twenty-server/src/database/commands/data-seed-dev-workspace.command.ts index 5f212a025a1d..b979aefa34da 100644 --- a/packages/twenty-server/src/database/commands/data-seed-dev-workspace.command.ts +++ b/packages/twenty-server/src/database/commands/data-seed-dev-workspace.command.ts @@ -6,7 +6,7 @@ import { EntityManager } from 'typeorm'; import { seedCoreSchema } from 'src/database/typeorm-seeds/core'; import { SEED_APPLE_WORKSPACE_ID, - SEED_TWENTY_WORKSPACE_ID, + SEED_ACME_WORKSPACE_ID, } from 'src/database/typeorm-seeds/core/workspaces'; import { getDevSeedCompanyCustomFields, @@ -53,7 +53,7 @@ import { WorkspaceSyncMetadataService } from 'src/engine/workspace-manager/works 'Seed workspace with initial data. This command is intended for development only.', }) export class DataSeedWorkspaceCommand extends CommandRunner { - workspaceIds = [SEED_APPLE_WORKSPACE_ID, SEED_TWENTY_WORKSPACE_ID]; + workspaceIds = [SEED_APPLE_WORKSPACE_ID, SEED_ACME_WORKSPACE_ID]; private readonly logger = new Logger(DataSeedWorkspaceCommand.name); constructor( diff --git a/packages/twenty-server/src/database/typeorm-seeds/core/userWorkspaces.ts b/packages/twenty-server/src/database/typeorm-seeds/core/userWorkspaces.ts index e5e621d045c3..b6170d848451 100644 --- a/packages/twenty-server/src/database/typeorm-seeds/core/userWorkspaces.ts +++ b/packages/twenty-server/src/database/typeorm-seeds/core/userWorkspaces.ts @@ -2,7 +2,7 @@ import { DataSource } from 'typeorm'; import { SEED_APPLE_WORKSPACE_ID, - SEED_TWENTY_WORKSPACE_ID, + SEED_ACME_WORKSPACE_ID, } from 'src/database/typeorm-seeds/core/workspaces'; import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity'; import { DEV_SEED_USER_IDS } from 'src/database/typeorm-seeds/core/users'; @@ -33,7 +33,7 @@ export const seedUserWorkspaces = async ( ]; } - if (workspaceId === SEED_TWENTY_WORKSPACE_ID) { + if (workspaceId === SEED_ACME_WORKSPACE_ID) { userWorkspaces = [ { userId: DEV_SEED_USER_IDS.TIM, diff --git a/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts b/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts index bfd5d34365ea..b1b59ea77a55 100644 --- a/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts +++ b/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts @@ -8,7 +8,7 @@ import { const tableName = 'workspace'; export const SEED_APPLE_WORKSPACE_ID = '20202020-1c25-4d02-bf25-6aeccf7ea419'; -export const SEED_TWENTY_WORKSPACE_ID = '3b8e6458-5fc1-4e63-8563-008ccddaa6db'; +export const SEED_ACME_WORKSPACE_ID = '3b8e6458-5fc1-4e63-8563-008ccddaa6db'; export const seedWorkspaces = async ( workspaceDataSource: DataSource, @@ -34,11 +34,11 @@ export const seedWorkspaces = async ( logo: 'https://twentyhq.github.io/placeholder-images/workspaces/apple-logo.png', activationStatus: WorkspaceActivationStatus.ACTIVE, }, - [SEED_TWENTY_WORKSPACE_ID]: { + [SEED_ACME_WORKSPACE_ID]: { id: workspaceId, - displayName: 'Twenty', - domainName: 'twenty.dev', - inviteHash: 'twenty.dev-invite-hash', + displayName: 'Acme', + domainName: 'acme.dev', + inviteHash: 'acme.dev-invite-hash', logo: 'https://twentyhq.github.io/placeholder-images/workspaces/twenty-logo.png', activationStatus: WorkspaceActivationStatus.ACTIVE, }, diff --git a/packages/twenty-server/src/database/typeorm-seeds/workspace/workspace-members.ts b/packages/twenty-server/src/database/typeorm-seeds/workspace/workspace-members.ts index 6a58ef5ae987..f0084dd3af76 100644 --- a/packages/twenty-server/src/database/typeorm-seeds/workspace/workspace-members.ts +++ b/packages/twenty-server/src/database/typeorm-seeds/workspace/workspace-members.ts @@ -2,7 +2,7 @@ import { EntityManager } from 'typeorm'; import { SEED_APPLE_WORKSPACE_ID, - SEED_TWENTY_WORKSPACE_ID, + SEED_ACME_WORKSPACE_ID, } from 'src/database/typeorm-seeds/core/workspaces'; import { WorkspaceMember } from 'src/engine/core-modules/user/dtos/workspace-member.dto'; import { DEV_SEED_USER_IDS } from 'src/database/typeorm-seeds/core/users'; @@ -64,7 +64,7 @@ export const seedWorkspaceMember = async ( ]; } - if (workspaceId === SEED_TWENTY_WORKSPACE_ID) { + if (workspaceId === SEED_ACME_WORKSPACE_ID) { workspaceMembers = [ { id: DEV_SEED_WORKSPACE_MEMBER_IDS.TIM, From 2fbceee7bf23f9154299b91a59dbb6343872edd6 Mon Sep 17 00:00:00 2001 From: Antoine Moreaux Date: Thu, 21 Nov 2024 15:29:22 +0100 Subject: [PATCH 2/2] Update workspaces.ts --- .../twenty-server/src/database/typeorm-seeds/core/workspaces.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts b/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts index b1b59ea77a55..c7e547a8e871 100644 --- a/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts +++ b/packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts @@ -39,7 +39,7 @@ export const seedWorkspaces = async ( displayName: 'Acme', domainName: 'acme.dev', inviteHash: 'acme.dev-invite-hash', - logo: 'https://twentyhq.github.io/placeholder-images/workspaces/twenty-logo.png', + logo: 'https://logos-world.net/wp-content/uploads/2022/05/Acme-Logo-700x394.png', activationStatus: WorkspaceActivationStatus.ACTIVE, }, };