Prisma Seed File Temaplate

Does anyone have a template for a seed file and data file to the t3stack template?
2 Replies
Neto
Neto2y ago
Prisma
Seeding your database
Learn how to seed your database using Prisma's integrated seeding functionality and Prisma Client
whatplan
whatplan2y ago
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
async function main() {
await prisma...
}
main()
.then(async () => {
await prisma.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
process.exit(1);
});
import { PrismaClient } from "@prisma/client";
const prisma = new PrismaClient();
async function main() {
await prisma...
}
main()
.then(async () => {
await prisma.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
process.exit(1);
});
Want results from more Discord servers?
Add your server