fixed team migration

This commit is contained in:
Kalle (Sendou)
2021-01-12 12:58:29 +02:00
parent b27d338fb6
commit 8f899bdc7f
3 changed files with 5 additions and 5 deletions

3
.gitignore vendored
View File

@@ -39,4 +39,5 @@ locale/_build/
locale/**/*.js
/prisma/scripts/mongo
/prisma/scripts/data
/prisma/scripts/data
dumped.sql

View File

@@ -1,6 +1,5 @@
-- AlterTable
ALTER TABLE "User" ADD COLUMN "teamId" INTEGER,
ADD COLUMN "teamId" INTEGER;
ALTER TABLE "User" ADD COLUMN "teamId" INTEGER;
-- CreateTable
CREATE TABLE "Team" (

View File

@@ -21,7 +21,7 @@ model User {
submittedRecords SalmonRunRecord[]
salmonRunRecords SalmonRunRecord[] @relation("SalmonRunRecordRoster")
freeAgentPost FreeAgentPost?
team Team? @relation("TeamRoster")
team Team? @relation(fields: [teamId], references: [id])
captainedTeam Team? @relation("TeamCaptain")
}
@@ -245,5 +245,5 @@ model Team {
inviteCode String @unique
captainId Int @unique
captain User @relation("TeamCaptain", fields: [captainId], references: [id])
roster User[] @relation("TeamRoster")
roster User[]
}