mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
refactor(workspaces): Rename SEED_TWENTY_WORKSPACE_ID to SEED_ACME_WO… (#8611)
…RKSPACE_ID The Pull Request modifies seed data by replacing SEED_TWENTY_WORKSPACE_ID with SEED_ACME_WORKSPACE_ID across several files. - Updated SEED_TWENTY_WORKSPACE_ID to SEED_ACME_WORKSPACE_ID. - Modified relevant import paths and seeds involving workspace data. - Changes affect seeding processes for workspace members, user workspaces, and general workspace details.
This commit is contained in:
parent
35f2d7a004
commit
4d8445a34a
@ -6,7 +6,7 @@ import { EntityManager } from 'typeorm';
|
|||||||
import { seedCoreSchema } from 'src/database/typeorm-seeds/core';
|
import { seedCoreSchema } from 'src/database/typeorm-seeds/core';
|
||||||
import {
|
import {
|
||||||
SEED_APPLE_WORKSPACE_ID,
|
SEED_APPLE_WORKSPACE_ID,
|
||||||
SEED_TWENTY_WORKSPACE_ID,
|
SEED_ACME_WORKSPACE_ID,
|
||||||
} from 'src/database/typeorm-seeds/core/workspaces';
|
} from 'src/database/typeorm-seeds/core/workspaces';
|
||||||
import {
|
import {
|
||||||
getDevSeedCompanyCustomFields,
|
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.',
|
'Seed workspace with initial data. This command is intended for development only.',
|
||||||
})
|
})
|
||||||
export class DataSeedWorkspaceCommand extends CommandRunner {
|
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);
|
private readonly logger = new Logger(DataSeedWorkspaceCommand.name);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -2,7 +2,7 @@ import { DataSource } from 'typeorm';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
SEED_APPLE_WORKSPACE_ID,
|
SEED_APPLE_WORKSPACE_ID,
|
||||||
SEED_TWENTY_WORKSPACE_ID,
|
SEED_ACME_WORKSPACE_ID,
|
||||||
} from 'src/database/typeorm-seeds/core/workspaces';
|
} from 'src/database/typeorm-seeds/core/workspaces';
|
||||||
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
import { UserWorkspace } from 'src/engine/core-modules/user-workspace/user-workspace.entity';
|
||||||
import { DEV_SEED_USER_IDS } from 'src/database/typeorm-seeds/core/users';
|
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 = [
|
userWorkspaces = [
|
||||||
{
|
{
|
||||||
userId: DEV_SEED_USER_IDS.TIM,
|
userId: DEV_SEED_USER_IDS.TIM,
|
||||||
|
@ -8,7 +8,7 @@ import {
|
|||||||
const tableName = 'workspace';
|
const tableName = 'workspace';
|
||||||
|
|
||||||
export const SEED_APPLE_WORKSPACE_ID = '20202020-1c25-4d02-bf25-6aeccf7ea419';
|
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 (
|
export const seedWorkspaces = async (
|
||||||
workspaceDataSource: DataSource,
|
workspaceDataSource: DataSource,
|
||||||
@ -34,12 +34,12 @@ export const seedWorkspaces = async (
|
|||||||
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/apple-logo.png',
|
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/apple-logo.png',
|
||||||
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
||||||
},
|
},
|
||||||
[SEED_TWENTY_WORKSPACE_ID]: {
|
[SEED_ACME_WORKSPACE_ID]: {
|
||||||
id: workspaceId,
|
id: workspaceId,
|
||||||
displayName: 'Twenty',
|
displayName: 'Acme',
|
||||||
domainName: 'twenty.dev',
|
domainName: 'acme.dev',
|
||||||
inviteHash: 'twenty.dev-invite-hash',
|
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,
|
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,7 @@ import { EntityManager } from 'typeorm';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
SEED_APPLE_WORKSPACE_ID,
|
SEED_APPLE_WORKSPACE_ID,
|
||||||
SEED_TWENTY_WORKSPACE_ID,
|
SEED_ACME_WORKSPACE_ID,
|
||||||
} from 'src/database/typeorm-seeds/core/workspaces';
|
} from 'src/database/typeorm-seeds/core/workspaces';
|
||||||
import { WorkspaceMember } from 'src/engine/core-modules/user/dtos/workspace-member.dto';
|
import { WorkspaceMember } from 'src/engine/core-modules/user/dtos/workspace-member.dto';
|
||||||
import { DEV_SEED_USER_IDS } from 'src/database/typeorm-seeds/core/users';
|
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 = [
|
workspaceMembers = [
|
||||||
{
|
{
|
||||||
id: DEV_SEED_WORKSPACE_MEMBER_IDS.TIM,
|
id: DEV_SEED_WORKSPACE_MEMBER_IDS.TIM,
|
||||||
|
Loading…
Reference in New Issue
Block a user