mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-29 22:58:18 -05:00
add fk migration
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "DetailedMap" ADD FOREIGN KEY ("ladderMatchId") REFERENCES "LadderMatch"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -292,6 +292,7 @@ model LadderMatch {
|
||||
dayId Int
|
||||
players LadderMatchPlayer[]
|
||||
day LadderDay @relation(fields: [dayId], references: [id])
|
||||
details DetailedMap[]
|
||||
}
|
||||
|
||||
model LadderDay {
|
||||
@@ -311,6 +312,7 @@ model DetailedMap {
|
||||
date DateTime?
|
||||
ladderMatchId Int?
|
||||
players DetailedMapPlayer[]
|
||||
ladderMatch LadderMatch? @relation(fields: [ladderMatchId], references: [id])
|
||||
}
|
||||
|
||||
enum WinnerLoser {
|
||||
|
||||
Reference in New Issue
Block a user