feat: rearchitecture of database schemas, migration reset, and #180

This commit is contained in:
DecDuck
2025-08-20 20:35:50 +10:00
parent 6853383e86
commit 322af0b4ca
125 changed files with 1384 additions and 1837 deletions

View File

@ -5,7 +5,6 @@ import prisma from "~/server/internal/db/database";
const DeleteVersion = type({
id: "string",
versionName: "string",
}).configure(throwingArktype);
export default defineEventHandler<{ body: typeof DeleteVersion }>(
@ -17,15 +16,9 @@ export default defineEventHandler<{ body: typeof DeleteVersion }>(
const body = await readDropValidatedBody(h3, DeleteVersion);
const gameId = body.id.toString();
const version = body.versionName.toString();
await prisma.gameVersion.delete({
await prisma.version.delete({
where: {
gameId_versionName: {
gameId: gameId,
versionName: version,
},
versionId: body.id,
},
});