Migrated to Prisma

Migrated to the Prisma ORM.
Text TODO: Change code
This commit is contained in:
rudi committed 2026-07-30 11:22:52 +02:00
1 parent 4948946c0d
commit 9aa94638d9
98 files changed
+19930 -3

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import { prisma } from "@/lib/db/prisma"
import argon2 from 'argon2'
export async function initDB() {
// const count = await prisma.user.count()
//
// if (count === 0) {
// await prisma.user.create({
// data: {
// email: process.env.ADMIN_EMAIL!,
// username: 'admin',
// password: await argon2.hash(process.env.ADMIN_PASSWORD!),
// role: 'admin',
// firstname: 'Admin'
// }
// })
// console.log('Admin-User angelegt.')
// }
console.log("Start der DB");
const count = await prisma.user.count();
console.log(count);
}