feat: beginnings of platform & redist management

This commit is contained in:
DecDuck
2025-08-27 19:52:36 +10:00
parent d323816b9e
commit ca7a89bbcf
17 changed files with 286 additions and 125 deletions

View File

@ -0,0 +1,14 @@
/*
Warnings:
- Made the column `libraryId` on table `Game` required. This step will fail if there are existing NULL values in that column.
*/
-- DropIndex
DROP INDEX "public"."GameTag_name_idx";
-- AlterTable
ALTER TABLE "public"."Game" ALTER COLUMN "libraryId" SET NOT NULL;
-- CreateIndex
CREATE INDEX "GameTag_name_idx" ON "public"."GameTag" USING GIST ("name" gist_trgm_ops(siglen=32));

View File

@ -34,10 +34,8 @@ model Game {
versions Version[]
mods Mod[]
// These fields will not be optional in the next version
// Any game without a library ID will be assigned one at startup, based on the defaults
libraryId String?
library Library? @relation(fields: [libraryId], references: [id], onDelete: Cascade, onUpdate: Cascade)
libraryId String
library Library @relation(fields: [libraryId], references: [id], onDelete: Cascade, onUpdate: Cascade)
libraryPath String
collections CollectionEntry[]