aboutsummaryrefslogtreecommitdiffstats
path: root/backend/prisma/seed.ts
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-06-29 17:50:28 -0700
committerPinapelz <yukais@pinapelz.com>2025-06-29 17:50:28 -0700
commit5e7e537b955bafd4a8bd855347a1f6466ce8d027 (patch)
tree3c75bbee23a8a585d57f6278f71b9eb057e01754 /backend/prisma/seed.ts
parentd55b767039605256c736166a942a9138e3eacfd7 (diff)
add game and score schema to orm
Diffstat (limited to 'backend/prisma/seed.ts')
-rw-r--r--backend/prisma/seed.ts21
1 files changed, 21 insertions, 0 deletions
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();
+ });
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage