diff --git a/app/api/db/seed.js b/app/api/db/seed.js index 7b26e70..d8ab0ba 100644 --- a/app/api/db/seed.js +++ b/app/api/db/seed.js @@ -80,9 +80,21 @@ async function main() { } existing = await db.project.findMany({where: { title: projects[1].title}}) if(!existing.length) { - await db.project.create({ + const result = await db.project.create({ data: projects[1], }) + + await db.project.create({ + data: { + ...projects[1], + title: `${projects[1].title} fork`, + forkedFrom: { + connect: { + id: result.id, + }, + }, + }, + }) }