This commit is contained in:
bipproduction
2025-11-30 08:08:48 +08:00
parent 4583897684
commit b15fd3acaa
12 changed files with 152 additions and 5 deletions

View File

@@ -29,3 +29,8 @@ model ApiKey {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Configs {
id String @id @default("1")
allowRegister Boolean @default(false)
}

View File

@@ -8,6 +8,10 @@ const user = [
}
];
const configs = {
allowRegister: false
}
; (async () => {
for (const u of user) {
await prisma.user.upsert({
@@ -19,7 +23,13 @@ const user = [
console.log(`✅ User ${u.email} seeded successfully`)
}
await prisma.configs.upsert({
where: { id: "1" },
create: configs,
update: configs,
})
console.log(`✅ Configs seeded successfully`)
})().catch((e) => {
console.error(e)
process.exit(1)