completed game importing; partial work on version importing

This commit is contained in:
DecDuck
2024-10-11 00:37:08 +11:00
parent 718f5ba514
commit a7c33e7d43
42 changed files with 1499 additions and 281 deletions

View File

@ -0,0 +1,25 @@
/*
Warnings:
- A unique constraint covering the columns `[libraryBasePath]` on the table `Game` will be added. If there are existing duplicate values, this will fail.
- Added the required column `libraryBasePath` to the `Game` table without a default value. This is not possible if the table is not empty.
- Added the required column `versionOrder` to the `Game` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Game" ADD COLUMN "libraryBasePath" TEXT NOT NULL,
ADD COLUMN "versionOrder" TEXT NOT NULL;
-- CreateTable
CREATE TABLE "GameVersion" (
"gameId" TEXT NOT NULL,
"versionName" TEXT NOT NULL,
CONSTRAINT "GameVersion_pkey" PRIMARY KEY ("gameId","versionName")
);
-- CreateIndex
CREATE UNIQUE INDEX "Game_libraryBasePath_key" ON "Game"("libraryBasePath");
-- AddForeignKey
ALTER TABLE "GameVersion" ADD CONSTRAINT "GameVersion_gameId_fkey" FOREIGN KEY ("gameId") REFERENCES "Game"("id") ON DELETE RESTRICT ON UPDATE CASCADE;