const { PrismaClient } = require("@prisma/client"); const prisma = new PrismaClient(); async function main() { await prisma.user.upsert({ where: { email: "test@example.com" }, update: {}, create: { email: "test@example.com", name: "Tester", messages: { create: [{ content: "Hello world" }, { content: "Second message" }] } } }); } main() .catch((e) => { console.error(e); process.exit(1); }) .finally(async () => { await prisma.$disconnect(); });