fix(prisma): update schema for Prisma v7 datasource URL changes
This commit is contained in:
@@ -9,7 +9,6 @@ export default defineConfig({
|
|||||||
migrations: {
|
migrations: {
|
||||||
path: "prisma/migrations",
|
path: "prisma/migrations",
|
||||||
},
|
},
|
||||||
engine: "classic",
|
|
||||||
datasource: {
|
datasource: {
|
||||||
url: env("DATABASE_URL"),
|
url: env("DATABASE_URL"),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ generator client {
|
|||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
provider = "postgresql"
|
provider = "postgresql"
|
||||||
url = env("DATABASE_URL")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
model Player {
|
model Player {
|
||||||
@@ -41,7 +40,7 @@ model User {
|
|||||||
emailVerified Boolean @default(false)
|
emailVerified Boolean @default(false)
|
||||||
name String?
|
name String?
|
||||||
image String?
|
image String?
|
||||||
role String @default("player") // player, tournament_admin, club_admin, site_admin
|
role String @default("player")
|
||||||
playerId Int? @unique
|
playerId Int? @unique
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
@@ -65,11 +64,10 @@ model Event {
|
|||||||
status String @default("planned")
|
status String @default("planned")
|
||||||
maxParticipants Int?
|
maxParticipants Int?
|
||||||
ownerId String?
|
ownerId String?
|
||||||
// Variant scoring support
|
|
||||||
targetScore Int? // Custom target score (default 5 for standard, or 10/15 for variant)
|
|
||||||
allowTies Boolean @default(false) // Whether ties/draws are valid outcomes
|
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
|
targetScore Int?
|
||||||
|
allowTies Boolean @default(false)
|
||||||
bracketMatchups BracketMatchup[]
|
bracketMatchups BracketMatchup[]
|
||||||
participants EventParticipant[]
|
participants EventParticipant[]
|
||||||
owner User? @relation("TournamentOwner", fields: [ownerId], references: [id])
|
owner User? @relation("TournamentOwner", fields: [ownerId], references: [id])
|
||||||
@@ -166,10 +164,10 @@ model Match {
|
|||||||
team1Score Int
|
team1Score Int
|
||||||
team2Score Int
|
team2Score Int
|
||||||
status String @default("completed")
|
status String @default("completed")
|
||||||
isCasual Boolean @default(false)
|
|
||||||
createdById String?
|
createdById String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
|
isCasual Boolean @default(false)
|
||||||
bracketMatchups BracketMatchup[]
|
bracketMatchups BracketMatchup[]
|
||||||
eloSnapshots EloSnapshot[]
|
eloSnapshots EloSnapshot[]
|
||||||
createdBy User? @relation("MatchCreator", fields: [createdById], references: [id])
|
createdBy User? @relation("MatchCreator", fields: [createdById], references: [id])
|
||||||
|
|||||||
Reference in New Issue
Block a user