mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 00:02:37 +10:00
feat(delete games): update prisma & delete games
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "GameVersion" DROP CONSTRAINT "GameVersion_gameId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "GameVersion" ADD CONSTRAINT "GameVersion_gameId_fkey" FOREIGN KEY ("gameId") REFERENCES "Game"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@ -0,0 +1,11 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "_DeveloperToGame" ADD CONSTRAINT "_DeveloperToGame_AB_pkey" PRIMARY KEY ("A", "B");
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "_DeveloperToGame_AB_unique";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "_GameToPublisher" ADD CONSTRAINT "_GameToPublisher_AB_pkey" PRIMARY KEY ("A", "B");
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "_GameToPublisher_AB_unique";
|
||||
@ -1,3 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (i.e. Git)
|
||||
# It should be added in your version-control system (e.g., Git)
|
||||
provider = "postgresql"
|
||||
@ -36,7 +36,7 @@ model Game {
|
||||
// A particular set of files that relate to the version
|
||||
model GameVersion {
|
||||
gameId String
|
||||
game Game @relation(fields: [gameId], references: [id])
|
||||
game Game @relation(fields: [gameId], references: [id], onDelete: Cascade)
|
||||
versionName String // Sub directory for the game files
|
||||
|
||||
created DateTime @default(now())
|
||||
|
||||
Reference in New Issue
Block a user