diff --git a/prisma/migrations/20260404022013_add_team_configuration/migration.sql b/prisma/migrations/20260404022013_add_team_configuration/migration.sql new file mode 100644 index 0000000..dc8a6cd --- /dev/null +++ b/prisma/migrations/20260404022013_add_team_configuration/migration.sql @@ -0,0 +1,7 @@ +-- AlterTable +ALTER TABLE "events" ADD COLUMN "allowByes" BOOLEAN NOT NULL DEFAULT true, +ADD COLUMN "maxRosterChanges" INTEGER, +ADD COLUMN "partnerRotation" TEXT NOT NULL DEFAULT 'none', +ADD COLUMN "requireAdminVerify" BOOLEAN NOT NULL DEFAULT false, +ADD COLUMN "teamConfiguration" JSONB, +ADD COLUMN "teamDurability" TEXT NOT NULL DEFAULT 'permanent'; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e9274de..5a2002a 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -63,6 +63,7 @@ model Event { description String? eventDate DateTime? eventType String @default("tournament") + tournamentType String @default("individual") format String @default("round_robin") status String @default("planned") maxParticipants Int? @@ -78,6 +79,14 @@ model Event { teams Team[] rounds TournamentRound[] + // Team configuration fields + teamDurability String @default("permanent") // permanent, variable, per_round + partnerRotation String @default("none") // none, minimize_repeat, maximize_even, elo_based + allowByes Boolean @default(true) + teamConfiguration Json? // Additional configuration options + maxRosterChanges Int? // Maximum roster changes per player + requireAdminVerify Boolean @default(false) // For match score verification + @@map("events") }