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:
Charles Bochet
2023-11-13 16:08:27 +01:00
committed by GitHub
parent c7568ff28b
commit 9a109758c8
68 changed files with 3031 additions and 286 deletions

View File

@ -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',