metadata engine

This commit is contained in:
DecDuck
2024-10-04 13:01:06 +10:00
parent d0a92b7932
commit 2773c4cc3b
16 changed files with 604 additions and 12 deletions
@@ -0,0 +1,16 @@
/*
Warnings:
- A unique constraint covering the columns `[metadataSource,metadataId]` on the table `Developer` will be added. If there are existing duplicate values, this will fail.
- A unique constraint covering the columns `[metadataSource,metadataId]` on the table `Game` will be added. If there are existing duplicate values, this will fail.
- A unique constraint covering the columns `[metadataSource,metadataId]` on the table `Publisher` will be added. If there are existing duplicate values, this will fail.
*/
-- CreateIndex
CREATE UNIQUE INDEX "Developer_metadataSource_metadataId_key" ON "Developer"("metadataSource", "metadataId");
-- CreateIndex
CREATE UNIQUE INDEX "Game_metadataSource_metadataId_key" ON "Game"("metadataSource", "metadataId");
-- CreateIndex
CREATE UNIQUE INDEX "Publisher_metadataSource_metadataId_key" ON "Publisher"("metadataSource", "metadataId");
@@ -0,0 +1,12 @@
/*
Warnings:
- Added the required column `mWebsite` to the `Developer` table without a default value. This is not possible if the table is not empty.
- Added the required column `mWebsite` to the `Publisher` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Developer" ADD COLUMN "mWebsite" TEXT NOT NULL;
-- AlterTable
ALTER TABLE "Publisher" ADD COLUMN "mWebsite" TEXT NOT NULL;
+8
View File
@@ -61,6 +61,8 @@ model Game {
mBannerId String // linked to objects in s3
mArt String[] // linked to objects in s3
mScreenshots String[] // linked to objects in s3
@@unique([metadataSource, metadataId], name: "metadataKey")
}
model Developer {
@@ -74,8 +76,11 @@ model Developer {
mDescription String
mLogo String
mBanner String
mWebsite String
games Game[]
@@unique([metadataSource, metadataId], name: "metadataKey")
}
model Publisher {
@@ -89,6 +94,9 @@ model Publisher {
mDescription String
mLogo String
mBanner String
mWebsite String
games Game[]
@@unique([metadataSource, metadataId], name: "metadataKey")
}