Migrate standard objects (#2439)
* Migrate standard objects * Add migrations * fix relation * fix: register RelationMetadataType enum * fix: correctly fix null relation --------- Co-authored-by: corentin <corentin@twenty.com> Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -5,7 +5,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
update: {},
|
||||
create: {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
title: 'Performance update',
|
||||
type: 'Note',
|
||||
body: '[{"id":"555df0c3-ab88-4c62-abae-c9b557c37c5b","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[{"type":"text","text":"In the North American region, we have observed a strong growth rate of 18% in sales. Europe followed suit with a significant 14% increase, while Asia-Pacific sustained its performance with a steady 10% rise. Special kudos to the North American team for the excellent work done in penetrating new markets and establishing stronger footholds in the existing ones.","styles":{}}],"children":[]},{"id":"13530934-b3ce-4332-9238-3760aa4acb3e","type":"paragraph","props":{"textColor":"default","backgroundColor":"default","textAlignment":"left"},"content":[],"children":[]}]',
|
||||
@ -21,7 +21,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
personId: null,
|
||||
companyId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
|
||||
activityId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -30,7 +30,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
update: {},
|
||||
create: {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb200',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
body: 'Hi Félix ! How do you like your Twenty workspace?',
|
||||
activityId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb400',
|
||||
commentThreadId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb400',
|
||||
@ -43,7 +43,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
update: {},
|
||||
create: {
|
||||
id: 'twenty-fe256b40-3ec3-4fe3-8997-b76aa0bfb200',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
body: 'I love it!',
|
||||
activityId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb400',
|
||||
commentThreadId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb400',
|
||||
@ -56,7 +56,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
update: {},
|
||||
create: {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfc408',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
title: 'Buyout Proposal',
|
||||
type: 'Task',
|
||||
assigneeId: 'twenty-ge256b39-3ec3-4fe3-8997-b76aa0bfa408',
|
||||
@ -74,7 +74,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
personId: 'twenty-755035db-623d-41fe-92e7-dd45b7c568e1',
|
||||
companyId: null,
|
||||
activityId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfc408',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -83,7 +83,7 @@ export const seedComments = async (prisma: PrismaClient) => {
|
||||
update: {},
|
||||
create: {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfb100',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
body: 'I really like this comment thread feature!',
|
||||
activityId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfc408',
|
||||
commentThreadId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfc408',
|
||||
|
||||
@ -7,7 +7,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
|
||||
name: 'Linkedin',
|
||||
domainName: 'linkedin.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -18,7 +18,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-118995f3-5d81-46d6-bf83-f7fd33ea6102',
|
||||
name: 'Facebook',
|
||||
domainName: 'facebook.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -29,7 +29,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-04b2e9f5-0713-40a5-8216-82802401d33e',
|
||||
name: 'Qonto',
|
||||
domainName: 'qonto.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -40,7 +40,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-460b6fb1-ed89-413a-b31a-962986e67bb4',
|
||||
name: 'Microsoft',
|
||||
domainName: 'microsoft.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -51,7 +51,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
name: 'Airbnb',
|
||||
domainName: 'airbnb.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -62,7 +62,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-0d940997-c21e-4ec2-873b-de4264d89025',
|
||||
name: 'Google',
|
||||
domainName: 'google.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -73,7 +73,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-1d3a1c6e-707e-44dc-a1d2-30030bf1a944',
|
||||
name: 'Netflix',
|
||||
domainName: 'netflix.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -84,7 +84,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-7a93d1e5-3f74-492d-a101-2a70f50a1645',
|
||||
name: 'Libeo',
|
||||
domainName: 'libeo.io',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -96,7 +96,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-9d162de6-cfbf-4156-a790-e39854dcd4eb',
|
||||
name: 'Claap',
|
||||
domainName: 'claap.io',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -108,7 +108,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-aaffcfbd-f86b-419f-b794-02319abe8637',
|
||||
name: 'Hasura',
|
||||
domainName: 'hasura.io',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -120,7 +120,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-f33dc242-5518-4553-9433-42d8eb82834b',
|
||||
name: 'Wework',
|
||||
domainName: 'wework.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -132,7 +132,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-a7bc68d5-f79e-40dd-bd06-c36e6abb4678',
|
||||
name: 'Samsung',
|
||||
domainName: 'samsung.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
@ -143,7 +143,7 @@ export const seedCompanies = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-a674fa6c-1455-4c57-afaf-dd5dc086361d',
|
||||
name: 'Algolia',
|
||||
domainName: 'algolia.com',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
address: '',
|
||||
},
|
||||
});
|
||||
|
||||
@ -1,15 +1,19 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
export const SeedDataSourceId = '20202020-7f63-47a9-b1b3-6c7290ca9fb1';
|
||||
export const SeedWorkspaceId = '20202020-1c25-4d02-bf25-6aeccf7ea419';
|
||||
export const SeedWorkspaceSchemaName = 'workspace_1wgvd1injqtife6y4rvfbu3h5';
|
||||
|
||||
export const seedMetadata = async (prisma: PrismaClient) => {
|
||||
await prisma.$queryRawUnsafe(
|
||||
'CREATE SCHEMA IF NOT EXISTS workspace_twenty_7icsva0r6s00mpcp6cwg4w4rd',
|
||||
`CREATE SCHEMA IF NOT EXISTS ${SeedWorkspaceSchemaName}`,
|
||||
);
|
||||
await prisma.$queryRawUnsafe(
|
||||
`INSERT INTO metadata."dataSource"(
|
||||
id, schema, type, "workspaceId"
|
||||
)
|
||||
VALUES (
|
||||
'b37b2163-7f63-47a9-b1b3-6c7290ca9fb1', 'workspace_twenty_7icsva0r6s00mpcp6cwg4w4rd', 'postgres', 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419'
|
||||
'${SeedDataSourceId}', '${SeedWorkspaceSchemaName}', 'postgres', '${SeedWorkspaceId}'
|
||||
) ON CONFLICT DO NOTHING`,
|
||||
);
|
||||
};
|
||||
|
||||
@ -7,7 +7,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-86083141-1c0e-494c-a1b6-85b1c6fefaa5',
|
||||
firstName: 'Christoph',
|
||||
lastName: 'Callisto',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33789012345',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
|
||||
@ -22,7 +22,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-0aa00beb-ac73-4797-824e-87a1f5aea9e0',
|
||||
firstName: 'Sylvie',
|
||||
lastName: 'Palmer',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33780123456',
|
||||
city: 'Los Angeles',
|
||||
companyId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
|
||||
@ -37,7 +37,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-93c72d2e-f517-42fd-80ae-14173b3b70ae',
|
||||
firstName: 'Christopher',
|
||||
lastName: 'Gonzalez',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33789012345',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-04b2e9f5-0713-40a5-8216-82802401d33e',
|
||||
@ -52,7 +52,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-eeeacacf-eee1-4690-ad2c-8619e5b56a2e',
|
||||
firstName: 'Ashley',
|
||||
lastName: 'Parker',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33780123456',
|
||||
city: 'Los Angeles',
|
||||
companyId: 'twenty-04b2e9f5-0713-40a5-8216-82802401d33e',
|
||||
@ -67,7 +67,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-9b324a88-6784-4449-afdf-dc62cb8702f2',
|
||||
firstName: 'Nicholas',
|
||||
lastName: 'Wright',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33781234567',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-460b6fb1-ed89-413a-b31a-962986e67bb4',
|
||||
@ -82,7 +82,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-1d151852-490f-4466-8391-733cfd66a0c8',
|
||||
firstName: 'Isabella',
|
||||
lastName: 'Scott',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33782345678',
|
||||
city: 'New York',
|
||||
companyId: 'twenty-460b6fb1-ed89-413a-b31a-962986e67bb4',
|
||||
@ -97,7 +97,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-98406e26-80f1-4dff-b570-a74942528de3',
|
||||
firstName: 'Matthew',
|
||||
lastName: 'Green',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33783456789',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-460b6fb1-ed89-413a-b31a-962986e67bb4',
|
||||
@ -112,7 +112,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-a2e78a5f-338b-46df-8811-fa08c7d19d35',
|
||||
firstName: 'Elizabeth',
|
||||
lastName: 'Baker',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33784567890',
|
||||
city: 'New York',
|
||||
companyId: 'twenty-89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
@ -127,7 +127,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-ca1f5bf3-64ad-4b0e-bbfd-e9fd795b7016',
|
||||
firstName: 'Christopher',
|
||||
lastName: 'Nelson',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33785678901',
|
||||
city: 'San Francisco',
|
||||
companyId: 'twenty-89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
@ -142,7 +142,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-56955422-5d54-41b7-ba36-f0d20e1417ae',
|
||||
firstName: 'Avery',
|
||||
lastName: 'Carter',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33786789012',
|
||||
city: 'New York',
|
||||
companyId: 'twenty-89bb825c-171e-4bcc-9cf7-43448d6fb278',
|
||||
@ -157,7 +157,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-755035db-623d-41fe-92e7-dd45b7c568e1',
|
||||
firstName: 'Ethan',
|
||||
lastName: 'Mitchell',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33787890123',
|
||||
city: 'Los Angeles',
|
||||
companyId: 'twenty-0d940997-c21e-4ec2-873b-de4264d89025',
|
||||
@ -172,7 +172,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-240da2ec-2d40-4e49-8df4-9c6a049190ef',
|
||||
firstName: 'Madison',
|
||||
lastName: 'Perez',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33788901234',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-0d940997-c21e-4ec2-873b-de4264d89025',
|
||||
@ -187,7 +187,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-240da2ec-2d40-4e49-8df4-9c6a049190df',
|
||||
firstName: 'Bertrand',
|
||||
lastName: 'Voulzy',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33788901234',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-0d940997-c21e-4ec2-873b-de4264d89025',
|
||||
@ -202,7 +202,7 @@ export const seedPeople = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-240da2ec-2d40-4e49-8df4-9c6a049190dg',
|
||||
firstName: 'Louis',
|
||||
lastName: 'Duss',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
phone: '+33788901234',
|
||||
city: 'Seattle',
|
||||
companyId: 'twenty-0d940997-c21e-4ec2-873b-de4264d89025',
|
||||
|
||||
@ -7,7 +7,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
name: 'Sales pipeline',
|
||||
icon: '💰',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
pipelineProgressableType: 'Company',
|
||||
},
|
||||
});
|
||||
@ -22,7 +22,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
position: 0,
|
||||
type: 'open',
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -36,7 +36,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
position: 1,
|
||||
type: 'ongoing',
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -50,7 +50,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
position: 2,
|
||||
type: 'ongoing',
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -64,7 +64,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
position: 3,
|
||||
type: 'ongoing',
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -78,7 +78,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
position: 4,
|
||||
type: 'won',
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -90,7 +90,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
pipelineStageId: 'twenty-fe256b39-3ec3-4fe3-8998-b76aa0bfb600',
|
||||
companyId: 'twenty-fe256b39-3ec3-4fe3-8997-b76aa0bfa408',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -102,7 +102,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
pipelineStageId: 'twenty-fe256b39-3ec3-4fe4-8998-b76aa0bfb600',
|
||||
companyId: 'twenty-118995f3-5d81-46d6-bf83-f7fd33ea6102',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -114,7 +114,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
pipelineStageId: 'twenty-fe256b39-3ec3-4fe5-8998-b76aa0bfb600',
|
||||
companyId: 'twenty-04b2e9f5-0713-40a5-8216-82802401d33e',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -126,7 +126,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b75aa0bfb400',
|
||||
pipelineStageId: 'twenty-fe256b39-3ec3-4fe5-8998-b76aa0bfb600',
|
||||
companyId: 'twenty-460b6fb1-ed89-413a-b31a-962986e67bb4',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -137,7 +137,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-fe256b39-3ec3-4fe3-8997-b74aa0bfb400',
|
||||
name: 'Customer support pipeline',
|
||||
icon: '📔',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
pipelineProgressableType: 'Person',
|
||||
},
|
||||
});
|
||||
@ -152,7 +152,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
position: 1,
|
||||
type: 'open',
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b74aa0bfb400',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
@ -164,7 +164,7 @@ export const seedPipelines = async (prisma: PrismaClient) => {
|
||||
pipelineId: 'twenty-fe256b39-3ec3-4fe3-8997-b74aa0bfb400',
|
||||
pipelineStageId: 'twenty-fe256b39-3ec3-4fe3-8998-a76aa0bfb600',
|
||||
personId: 'twenty-755035db-623d-41fe-92e7-dd45b7c568e1',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ export const seedUsers = async (prisma: PrismaClient) => {
|
||||
id: 'twenty-7ef9d213-1c25-4d02-bf35-6aeccf7ea419',
|
||||
},
|
||||
create: {
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
settingsId: 'twenty-ge256b39-3ec3-4fe3-8997-9dcb1084c109',
|
||||
},
|
||||
},
|
||||
@ -57,7 +57,7 @@ export const seedUsers = async (prisma: PrismaClient) => {
|
||||
workspaceMember: {
|
||||
create: {
|
||||
id: 'twenty-7ef9d213-1c25-4d02-bf35-6aeccf7ea419',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
settingsId: 'twenty-ge256b39-3ec3-4fe3-8997-2c4a2035a215',
|
||||
},
|
||||
},
|
||||
@ -86,7 +86,7 @@ export const seedUsers = async (prisma: PrismaClient) => {
|
||||
workspaceMember: {
|
||||
create: {
|
||||
id: 'twenty-7ed9d213-1c25-4d02-bf35-6aeccf7ea419',
|
||||
workspaceId: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
workspaceId: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
settingsId: 'twenty-ge256b39-3ec3-4fe3-8997-8e1f2097b328',
|
||||
},
|
||||
},
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
export const seedWorkspaces = async (prisma: PrismaClient) => {
|
||||
await prisma.workspace.upsert({
|
||||
where: { id: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419' },
|
||||
where: { id: '20202020-1c25-4d02-bf25-6aeccf7ea419' },
|
||||
update: {},
|
||||
create: {
|
||||
id: 'twenty-7ed9d212-1c25-4d02-bf25-6aeccf7ea419',
|
||||
id: '20202020-1c25-4d02-bf25-6aeccf7ea419',
|
||||
displayName: 'Apple',
|
||||
domainName: 'apple.dev',
|
||||
inviteHash: 'apple.dev-invite-hash',
|
||||
|
||||
Reference in New Issue
Block a user