Seed workspaces as active
This commit is contained in:
@ -1,6 +1,9 @@
|
|||||||
import { DataSource } from 'typeorm';
|
import { DataSource } from 'typeorm';
|
||||||
|
|
||||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
import {
|
||||||
|
Workspace,
|
||||||
|
WorkspaceActivationStatus,
|
||||||
|
} from 'src/engine/core-modules/workspace/workspace.entity';
|
||||||
|
|
||||||
const tableName = 'workspace';
|
const tableName = 'workspace';
|
||||||
|
|
||||||
@ -15,7 +18,12 @@ export const seedWorkspaces = async (
|
|||||||
const workspaces: {
|
const workspaces: {
|
||||||
[key: string]: Pick<
|
[key: string]: Pick<
|
||||||
Workspace,
|
Workspace,
|
||||||
'id' | 'displayName' | 'domainName' | 'inviteHash' | 'logo'
|
| 'id'
|
||||||
|
| 'displayName'
|
||||||
|
| 'domainName'
|
||||||
|
| 'inviteHash'
|
||||||
|
| 'logo'
|
||||||
|
| 'activationStatus'
|
||||||
>;
|
>;
|
||||||
} = {
|
} = {
|
||||||
[SEED_APPLE_WORKSPACE_ID]: {
|
[SEED_APPLE_WORKSPACE_ID]: {
|
||||||
@ -24,6 +32,7 @@ export const seedWorkspaces = async (
|
|||||||
domainName: 'apple.dev',
|
domainName: 'apple.dev',
|
||||||
inviteHash: 'apple.dev-invite-hash',
|
inviteHash: 'apple.dev-invite-hash',
|
||||||
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,
|
||||||
},
|
},
|
||||||
[SEED_TWENTY_WORKSPACE_ID]: {
|
[SEED_TWENTY_WORKSPACE_ID]: {
|
||||||
id: workspaceId,
|
id: workspaceId,
|
||||||
@ -31,6 +40,7 @@ export const seedWorkspaces = async (
|
|||||||
domainName: 'twenty.dev',
|
domainName: 'twenty.dev',
|
||||||
inviteHash: 'twenty.dev-invite-hash',
|
inviteHash: 'twenty.dev-invite-hash',
|
||||||
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/twenty-logo.png',
|
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/twenty-logo.png',
|
||||||
|
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -43,6 +53,7 @@ export const seedWorkspaces = async (
|
|||||||
'domainName',
|
'domainName',
|
||||||
'inviteHash',
|
'inviteHash',
|
||||||
'logo',
|
'logo',
|
||||||
|
'activationStatus',
|
||||||
])
|
])
|
||||||
.orIgnore()
|
.orIgnore()
|
||||||
.values(workspaces[workspaceId])
|
.values(workspaces[workspaceId])
|
||||||
|
|||||||
Reference in New Issue
Block a user