From 5e7e537b955bafd4a8bd855347a1f6466ce8d027 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Sun, 29 Jun 2025 17:50:28 -0700 Subject: add game and score schema to orm --- backend/prisma/seed.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 backend/prisma/seed.ts (limited to 'backend/prisma/seed.ts') diff --git a/backend/prisma/seed.ts b/backend/prisma/seed.ts new file mode 100644 index 0000000..9f98e81 --- /dev/null +++ b/backend/prisma/seed.ts @@ -0,0 +1,21 @@ +import { PrismaClient } from '@prisma/client'; + +const prisma = new PrismaClient(); + +async function main() { + await prisma.games.createMany({ + data: [ + { gameName: 'Dancerush' }, + ], + }); + console.log('Initial seed data inserted'); +} + +main() + .catch((e) => { + console.error(e); + process.exit(1); + }) + .finally(async () => { + await prisma.$disconnect(); + }); -- cgit v1.2.3