Skip to content

Commit 45ebb0b

Browse files
committed
Seed workspaces as active
1 parent e3496a1 commit 45ebb0b

File tree

1 file changed

+13
-2
lines changed
  • packages/twenty-server/src/database/typeorm-seeds/core

1 file changed

+13
-2
lines changed

packages/twenty-server/src/database/typeorm-seeds/core/workspaces.ts

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { DataSource } from 'typeorm';
22

3-
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
3+
import {
4+
Workspace,
5+
WorkspaceActivationStatus,
6+
} from 'src/engine/core-modules/workspace/workspace.entity';
47

58
const tableName = 'workspace';
69

@@ -15,7 +18,12 @@ export const seedWorkspaces = async (
1518
const workspaces: {
1619
[key: string]: Pick<
1720
Workspace,
18-
'id' | 'displayName' | 'domainName' | 'inviteHash' | 'logo'
21+
| 'id'
22+
| 'displayName'
23+
| 'domainName'
24+
| 'inviteHash'
25+
| 'logo'
26+
| 'activationStatus'
1927
>;
2028
} = {
2129
[SEED_APPLE_WORKSPACE_ID]: {
@@ -24,13 +32,15 @@ export const seedWorkspaces = async (
2432
domainName: 'apple.dev',
2533
inviteHash: 'apple.dev-invite-hash',
2634
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/apple-logo.png',
35+
activationStatus: WorkspaceActivationStatus.ACTIVE,
2736
},
2837
[SEED_TWENTY_WORKSPACE_ID]: {
2938
id: workspaceId,
3039
displayName: 'Twenty',
3140
domainName: 'twenty.dev',
3241
inviteHash: 'twenty.dev-invite-hash',
3342
logo: 'https://twentyhq.github.io/placeholder-images/workspaces/twenty-logo.png',
43+
activationStatus: WorkspaceActivationStatus.ACTIVE,
3444
},
3545
};
3646

@@ -43,6 +53,7 @@ export const seedWorkspaces = async (
4353
'domainName',
4454
'inviteHash',
4555
'logo',
56+
'activationStatus',
4657
])
4758
.orIgnore()
4859
.values(workspaces[workspaceId])

0 commit comments

Comments
 (0)