mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-16 09:41:13 +10:00
feat: add ludusavi metadata import into database
WARNING: includes debug route
This commit is contained in:
@ -0,0 +1,19 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "LudusaviEntry" (
|
||||
"name" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "LudusaviEntry_pkey" PRIMARY KEY ("name")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "LudusaviPlatformEntry" (
|
||||
"ludusaviEntryName" TEXT NOT NULL,
|
||||
"platform" "Platform" NOT NULL,
|
||||
"files" TEXT[],
|
||||
"registry" TEXT[],
|
||||
|
||||
CONSTRAINT "LudusaviPlatformEntry_pkey" PRIMARY KEY ("ludusaviEntryName","platform")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "LudusaviPlatformEntry" ADD CONSTRAINT "LudusaviPlatformEntry_ludusaviEntryName_fkey" FOREIGN KEY ("ludusaviEntryName") REFERENCES "LudusaviEntry"("name") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "LudusaviEntry" ADD COLUMN "steamId" TEXT;
|
||||
18
prisma/models/ludusavi.prisma
Normal file
18
prisma/models/ludusavi.prisma
Normal file
@ -0,0 +1,18 @@
|
||||
model LudusaviEntry {
|
||||
name String @id
|
||||
steamId String?
|
||||
|
||||
entries LudusaviPlatformEntry[]
|
||||
}
|
||||
|
||||
model LudusaviPlatformEntry {
|
||||
ludusaviEntryName String
|
||||
ludusaviEntry LudusaviEntry @relation(fields: [ludusaviEntryName], references: [name])
|
||||
|
||||
platform Platform
|
||||
|
||||
files String[]
|
||||
registry String[]
|
||||
|
||||
@@id([ludusaviEntryName, platform])
|
||||
}
|
||||
Reference in New Issue
Block a user