Files
wajs-server/prisma/seed.ts
bipproduction 9e60f5ebf6 tambahannya
2025-10-15 21:17:25 +08:00

31 lines
561 B
TypeScript

import { prisma } from "@/server/lib/prisma";
const user = [
{
name: "Bip",
email: "bip@bip.com",
password: "bip",
}
];
; (async () => {
for (const u of user) {
await prisma.user.upsert({
where: { email: u.email },
create: u,
update: u,
})
console.log(`✅ User ${u.email} seeded successfully`)
}
})().catch((e) => {
console.error(e)
process.exit(1)
}).finally(() => {
console.log("✅ Seeding completed successfully ")
process.exit(0)
})