From 469a85a0f8497470a40e7806e3a1511a8acf40c4 Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Thu, 16 Oct 2025 00:32:48 -0700 Subject: [PATCH] feat: add draft pick, queue, and timer models with database schema updates --- app/models/draft-pick.ts | 65 ++ app/models/draft-queue.ts | 76 ++ app/models/draft-timer.ts | 46 + app/models/draft-utils.ts | 160 ++++ app/models/index.ts | 4 + database/schema.ts | 59 ++ drizzle/0017_calm_zarda.sql | 85 ++ drizzle/meta/0017_snapshot.json | 1394 +++++++++++++++++++++++++++++++ drizzle/meta/_journal.json | 7 + 9 files changed, 1896 insertions(+) create mode 100644 app/models/draft-pick.ts create mode 100644 app/models/draft-queue.ts create mode 100644 app/models/draft-timer.ts create mode 100644 app/models/draft-utils.ts create mode 100644 drizzle/0017_calm_zarda.sql create mode 100644 drizzle/meta/0017_snapshot.json diff --git a/app/models/draft-pick.ts b/app/models/draft-pick.ts new file mode 100644 index 0000000..b9ff026 --- /dev/null +++ b/app/models/draft-pick.ts @@ -0,0 +1,65 @@ +import { database } from "~/database/context"; +import * as schema from "~/database/schema"; +import { eq, and } from "drizzle-orm"; + +export async function createDraftPick(data: { + seasonId: string; + teamId: string; + participantId: string; + pickNumber: number; + round: number; + pickInRound: number; + pickedByUserId: string; + pickedByType: "owner" | "commissioner" | "auto"; + timeUsed: number; +}) { + const db = database(); + const [pick] = await db.insert(schema.draftPicks).values(data).returning(); + return pick; +} + +export async function getDraftPicks(seasonId: string) { + const db = database(); + return await db + .select() + .from(schema.draftPicks) + .where(eq(schema.draftPicks.seasonId, seasonId)) + .orderBy(schema.draftPicks.pickNumber); +} + +export async function getDraftPickByNumber(seasonId: string, pickNumber: number) { + const db = database(); + const [pick] = await db + .select() + .from(schema.draftPicks) + .where( + and( + eq(schema.draftPicks.seasonId, seasonId), + eq(schema.draftPicks.pickNumber, pickNumber) + ) + ); + return pick; +} + +export async function getTeamDraftPicks(teamId: string) { + const db = database(); + return await db + .select() + .from(schema.draftPicks) + .where(eq(schema.draftPicks.teamId, teamId)) + .orderBy(schema.draftPicks.pickNumber); +} + +export async function isParticipantDrafted(seasonId: string, participantId: string) { + const db = database(); + const [pick] = await db + .select() + .from(schema.draftPicks) + .where( + and( + eq(schema.draftPicks.seasonId, seasonId), + eq(schema.draftPicks.participantId, participantId) + ) + ); + return !!pick; +} diff --git a/app/models/draft-queue.ts b/app/models/draft-queue.ts new file mode 100644 index 0000000..5ecd9b6 --- /dev/null +++ b/app/models/draft-queue.ts @@ -0,0 +1,76 @@ +import { database } from "~/database/context"; +import * as schema from "~/database/schema"; +import { eq, and, asc } from "drizzle-orm"; + +export async function addToQueue(data: { + seasonId: string; + teamId: string; + participantId: string; + queuePosition: number; +}) { + const db = database(); + const [item] = await db.insert(schema.draftQueue).values(data).returning(); + return item; +} + +export async function removeFromQueue(queueId: string) { + const db = database(); + await db.delete(schema.draftQueue).where(eq(schema.draftQueue.id, queueId)); +} + +export async function getTeamQueue(teamId: string) { + const db = database(); + return await db + .select() + .from(schema.draftQueue) + .where(eq(schema.draftQueue.teamId, teamId)) + .orderBy(asc(schema.draftQueue.queuePosition)); +} + +export async function clearTeamQueue(teamId: string) { + const db = database(); + await db.delete(schema.draftQueue).where(eq(schema.draftQueue.teamId, teamId)); +} + +export async function reorderQueue(teamId: string, participantIds: string[]) { + // Delete existing queue + await clearTeamQueue(teamId); + + // Get season ID from first queue item (or we need to pass it) + // For now, we'll need to pass seasonId + return participantIds; +} + +export async function reorderQueueWithSeason( + seasonId: string, + teamId: string, + participantIds: string[] +) { + // Delete existing queue + await clearTeamQueue(teamId); + + // Insert new queue in order + const items = participantIds.map((participantId, index) => ({ + seasonId, + teamId, + participantId, + queuePosition: index + 1, + })); + + if (items.length > 0) { + const db = database(); + await db.insert(schema.draftQueue).values(items); + } +} + +export async function removeParticipantFromQueue(teamId: string, participantId: string) { + const db = database(); + await db + .delete(schema.draftQueue) + .where( + and( + eq(schema.draftQueue.teamId, teamId), + eq(schema.draftQueue.participantId, participantId) + ) + ); +} diff --git a/app/models/draft-timer.ts b/app/models/draft-timer.ts new file mode 100644 index 0000000..a267474 --- /dev/null +++ b/app/models/draft-timer.ts @@ -0,0 +1,46 @@ +import { database } from "~/database/context"; +import * as schema from "~/database/schema"; +import { eq } from "drizzle-orm"; + +export async function initializeDraftTimers(seasonId: string, teams: { id: string }[], initialTime: number) { + const timerData = teams.map((team) => ({ + seasonId, + teamId: team.id, + timeRemaining: initialTime, + })); + + const db = database(); + await db.insert(schema.draftTimers).values(timerData); +} + +export async function getTeamTimer(teamId: string) { + const db = database(); + const [timer] = await db + .select() + .from(schema.draftTimers) + .where(eq(schema.draftTimers.teamId, teamId)); + return timer; +} + +export async function getSeasonTimers(seasonId: string) { + const db = database(); + return await db + .select() + .from(schema.draftTimers) + .where(eq(schema.draftTimers.seasonId, seasonId)); +} + +export async function updateTeamTimer(teamId: string, timeRemaining: number) { + const db = database(); + const [timer] = await db + .update(schema.draftTimers) + .set({ timeRemaining, updatedAt: new Date() }) + .where(eq(schema.draftTimers.teamId, teamId)) + .returning(); + return timer; +} + +export async function deleteSeasonTimers(seasonId: string) { + const db = database(); + await db.delete(schema.draftTimers).where(eq(schema.draftTimers.seasonId, seasonId)); +} diff --git a/app/models/draft-utils.ts b/app/models/draft-utils.ts new file mode 100644 index 0000000..1c818a3 --- /dev/null +++ b/app/models/draft-utils.ts @@ -0,0 +1,160 @@ +import { database } from "~/database/context"; +import * as schema from "~/database/schema"; +import { eq, and, notInArray, desc } from "drizzle-orm"; +import { getTeamQueue } from "./draft-queue"; +import { isParticipantDrafted } from "./draft-pick"; + +/** + * Auto-pick for a team when their timer runs out + * 1. Check queue - pick first item if available + * 2. If queue empty, pick highest EV participant not drafted + */ +export async function autoPickForTeam(seasonId: string, teamId: string) { + // Check queue first + const queue = await getTeamQueue(teamId); + + if (queue.length > 0) { + // Pick first item from queue + const firstInQueue = queue[0]; + + // Verify participant is not already drafted + const isDrafted = await isParticipantDrafted(seasonId, firstInQueue.participantId); + if (!isDrafted) { + return firstInQueue.participantId; + } + + // If first item was drafted, try next items in queue + for (const item of queue.slice(1)) { + const isDrafted = await isParticipantDrafted(seasonId, item.participantId); + if (!isDrafted) { + return item.participantId; + } + } + } + + // Queue is empty or all queued players drafted - pick highest EV available + return await getTopAvailableParticipant(seasonId); +} + +/** + * Get the highest EV participant that hasn't been drafted yet + */ +export async function getTopAvailableParticipant(seasonId: string) { + const db = database(); + + // Get all drafted participant IDs + const draftedPicks = await db + .select({ participantId: schema.draftPicks.participantId }) + .from(schema.draftPicks) + .where(eq(schema.draftPicks.seasonId, seasonId)); + + const draftedIds = draftedPicks.map((p: { participantId: string }) => p.participantId); + + // Get all participants from season sports + const seasonSportsData = await db + .select({ sportsSeasonId: schema.seasonSports.sportsSeasonId }) + .from(schema.seasonSports) + .where(eq(schema.seasonSports.seasonId, seasonId)); + + const sportsSeasonIds = seasonSportsData.map((s: { sportsSeasonId: string }) => s.sportsSeasonId); + + if (sportsSeasonIds.length === 0) { + return null; + } + + // Get top available participant by EV + let query = db + .select() + .from(schema.participants) + .where(eq(schema.participants.sportsSeasonId, sportsSeasonIds[0])) + .orderBy(desc(schema.participants.expectedValue), schema.participants.name); + + // Filter out drafted participants if any exist + if (draftedIds.length > 0) { + query = db + .select() + .from(schema.participants) + .where( + and( + eq(schema.participants.sportsSeasonId, sportsSeasonIds[0]), + notInArray(schema.participants.id, draftedIds) + ) + ) + .orderBy(desc(schema.participants.expectedValue), schema.participants.name); + } + + // Handle multiple sports seasons + if (sportsSeasonIds.length > 1) { + // For simplicity, we'll query all and sort in memory + // In production, might want to optimize this + const allParticipants = []; + + for (const sportsSeasonId of sportsSeasonIds) { + let participantQuery = db + .select() + .from(schema.participants) + .where(eq(schema.participants.sportsSeasonId, sportsSeasonId)); + + if (draftedIds.length > 0) { + participantQuery = db + .select() + .from(schema.participants) + .where( + and( + eq(schema.participants.sportsSeasonId, sportsSeasonId), + notInArray(schema.participants.id, draftedIds) + ) + ); + } + + const seasonParticipants = await participantQuery; + allParticipants.push(...seasonParticipants); + } + + // Sort by EV desc, then name + allParticipants.sort((a, b) => { + if (b.expectedValue !== a.expectedValue) { + return b.expectedValue - a.expectedValue; + } + return a.name.localeCompare(b.name); + }); + + return allParticipants[0]?.id || null; + } + + const [topParticipant] = await query; + return topParticipant?.id || null; +} + +/** + * Calculate the current pick based on draft order and round + */ +export function calculatePickInfo( + pickNumber: number, + teamCount: number +): { round: number; pickInRound: number; teamIndex: number } { + const round = Math.ceil(pickNumber / teamCount); + const pickInRound = ((pickNumber - 1) % teamCount) + 1; + + // Snake draft: odd rounds go forward, even rounds go backward + const isOddRound = round % 2 === 1; + const teamIndex = isOddRound ? pickInRound - 1 : teamCount - pickInRound; + + return { round, pickInRound, teamIndex }; +} + +/** + * Get the team ID for a given pick number based on draft order + */ +export function getTeamForPick( + pickNumber: number, + draftOrder: { teamId: string; draftOrder: number }[] +): string | null { + const sortedOrder = [...draftOrder].sort((a, b) => a.draftOrder - b.draftOrder); + const teamCount = sortedOrder.length; + + if (teamCount === 0) return null; + + const { teamIndex } = calculatePickInfo(pickNumber, teamCount); + return sortedOrder[teamIndex]?.teamId || null; +} diff --git a/app/models/index.ts b/app/models/index.ts index b4d8fad..2c499dd 100644 --- a/app/models/index.ts +++ b/app/models/index.ts @@ -12,3 +12,7 @@ export * from "./season-template-sport"; export * from "./season-sport"; export * from "./participant-result"; export * from "./draft-slot"; +export * from "./draft-pick"; +export * from "./draft-queue"; +export * from "./draft-timer"; +export * from "./draft-utils"; diff --git a/database/schema.ts b/database/schema.ts index de29bf0..efc5282 100644 --- a/database/schema.ts +++ b/database/schema.ts @@ -39,6 +39,12 @@ export const scoringTypeEnum = pgEnum("scoring_type", [ "majors", ]); +export const pickedByTypeEnum = pgEnum("picked_by_type", [ + "owner", + "commissioner", + "auto", +]); + export const leagues = pgTable("leagues", { id: uuid("id").primaryKey().defaultRandom(), name: varchar("name", { length: 255 }).notNull(), @@ -70,6 +76,11 @@ export const seasons = pgTable("seasons", { draftRounds: integer("draft_rounds").notNull().default(20), flexSpots: integer("flex_spots").notNull().default(0), draftDateTime: timestamp("draft_date_time"), + draftInitialTime: integer("draft_initial_time").notNull().default(120), // seconds + draftIncrementTime: integer("draft_increment_time").notNull().default(30), // seconds + currentPickNumber: integer("current_pick_number").default(1), + draftStartedAt: timestamp("draft_started_at"), + draftPaused: boolean("draft_paused").notNull().default(false), inviteCode: varchar("invite_code", { length: 20 }).notNull().unique(), createdAt: timestamp("created_at").defaultNow().notNull(), updatedAt: timestamp("updated_at").defaultNow().notNull(), @@ -100,6 +111,54 @@ export const draftSlots = pgTable("draft_slots", { updatedAt: timestamp("updated_at").defaultNow().notNull(), }); +export const draftPicks = pgTable("draft_picks", { + id: uuid("id").primaryKey().defaultRandom(), + seasonId: uuid("season_id") + .notNull() + .references(() => seasons.id, { onDelete: "cascade" }), + teamId: uuid("team_id") + .notNull() + .references(() => teams.id, { onDelete: "cascade" }), + participantId: uuid("participant_id") + .notNull() + .references(() => participants.id, { onDelete: "cascade" }), + pickNumber: integer("pick_number").notNull(), + round: integer("round").notNull(), + pickInRound: integer("pick_in_round").notNull(), + pickedByUserId: varchar("picked_by_user_id", { length: 255 }).notNull(), // Clerk user ID + pickedByType: pickedByTypeEnum("picked_by_type").notNull(), + timeUsed: integer("time_used").notNull().default(0), // seconds + createdAt: timestamp("created_at").defaultNow().notNull(), +}); + +export const draftQueue = pgTable("draft_queue", { + id: uuid("id").primaryKey().defaultRandom(), + seasonId: uuid("season_id") + .notNull() + .references(() => seasons.id, { onDelete: "cascade" }), + teamId: uuid("team_id") + .notNull() + .references(() => teams.id, { onDelete: "cascade" }), + participantId: uuid("participant_id") + .notNull() + .references(() => participants.id, { onDelete: "cascade" }), + queuePosition: integer("queue_position").notNull(), + createdAt: timestamp("created_at").defaultNow().notNull(), + updatedAt: timestamp("updated_at").defaultNow().notNull(), +}); + +export const draftTimers = pgTable("draft_timers", { + id: uuid("id").primaryKey().defaultRandom(), + seasonId: uuid("season_id") + .notNull() + .references(() => seasons.id, { onDelete: "cascade" }), + teamId: uuid("team_id") + .notNull() + .references(() => teams.id, { onDelete: "cascade" }), + timeRemaining: integer("time_remaining").notNull(), // seconds + updatedAt: timestamp("updated_at").defaultNow().notNull(), +}); + export const commissioners = pgTable("commissioners", { id: uuid("id").primaryKey().defaultRandom(), leagueId: uuid("league_id") diff --git a/drizzle/0017_calm_zarda.sql b/drizzle/0017_calm_zarda.sql new file mode 100644 index 0000000..6eafc1d --- /dev/null +++ b/drizzle/0017_calm_zarda.sql @@ -0,0 +1,85 @@ +CREATE TYPE "public"."picked_by_type" AS ENUM('owner', 'commissioner', 'auto');--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "draft_picks" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "season_id" uuid NOT NULL, + "team_id" uuid NOT NULL, + "participant_id" uuid NOT NULL, + "pick_number" integer NOT NULL, + "round" integer NOT NULL, + "pick_in_round" integer NOT NULL, + "picked_by_user_id" varchar(255) NOT NULL, + "picked_by_type" "picked_by_type" NOT NULL, + "time_used" integer DEFAULT 0 NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "draft_queue" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "season_id" uuid NOT NULL, + "team_id" uuid NOT NULL, + "participant_id" uuid NOT NULL, + "queue_position" integer NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "draft_timers" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "season_id" uuid NOT NULL, + "team_id" uuid NOT NULL, + "time_remaining" integer NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "seasons" ADD COLUMN "draft_initial_time" integer DEFAULT 120 NOT NULL;--> statement-breakpoint +ALTER TABLE "seasons" ADD COLUMN "draft_increment_time" integer DEFAULT 30 NOT NULL;--> statement-breakpoint +ALTER TABLE "seasons" ADD COLUMN "current_pick_number" integer DEFAULT 1;--> statement-breakpoint +ALTER TABLE "seasons" ADD COLUMN "draft_started_at" timestamp;--> statement-breakpoint +ALTER TABLE "seasons" ADD COLUMN "draft_paused" boolean DEFAULT false NOT NULL;--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_picks" ADD CONSTRAINT "draft_picks_season_id_seasons_id_fk" FOREIGN KEY ("season_id") REFERENCES "public"."seasons"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_picks" ADD CONSTRAINT "draft_picks_team_id_teams_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_picks" ADD CONSTRAINT "draft_picks_participant_id_participants_id_fk" FOREIGN KEY ("participant_id") REFERENCES "public"."participants"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_queue" ADD CONSTRAINT "draft_queue_season_id_seasons_id_fk" FOREIGN KEY ("season_id") REFERENCES "public"."seasons"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_queue" ADD CONSTRAINT "draft_queue_team_id_teams_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_queue" ADD CONSTRAINT "draft_queue_participant_id_participants_id_fk" FOREIGN KEY ("participant_id") REFERENCES "public"."participants"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_timers" ADD CONSTRAINT "draft_timers_season_id_seasons_id_fk" FOREIGN KEY ("season_id") REFERENCES "public"."seasons"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "draft_timers" ADD CONSTRAINT "draft_timers_team_id_teams_id_fk" FOREIGN KEY ("team_id") REFERENCES "public"."teams"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; diff --git a/drizzle/meta/0017_snapshot.json b/drizzle/meta/0017_snapshot.json new file mode 100644 index 0000000..c992cf5 --- /dev/null +++ b/drizzle/meta/0017_snapshot.json @@ -0,0 +1,1394 @@ +{ + "id": "c4b604e2-a0eb-4e60-93b5-8c3c0c76cdd6", + "prevId": "136b08c0-8a23-4f26-b521-8a8e0fc7f755", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.commissioners": { + "name": "commissioners", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "league_id": { + "name": "league_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "commissioners_league_id_leagues_id_fk": { + "name": "commissioners_league_id_leagues_id_fk", + "tableFrom": "commissioners", + "tableTo": "leagues", + "columnsFrom": [ + "league_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.draft_picks": { + "name": "draft_picks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "season_id": { + "name": "season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "team_id": { + "name": "team_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "participant_id": { + "name": "participant_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "pick_number": { + "name": "pick_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "round": { + "name": "round", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "pick_in_round": { + "name": "pick_in_round", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "picked_by_user_id": { + "name": "picked_by_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "picked_by_type": { + "name": "picked_by_type", + "type": "picked_by_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "time_used": { + "name": "time_used", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "draft_picks_season_id_seasons_id_fk": { + "name": "draft_picks_season_id_seasons_id_fk", + "tableFrom": "draft_picks", + "tableTo": "seasons", + "columnsFrom": [ + "season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "draft_picks_team_id_teams_id_fk": { + "name": "draft_picks_team_id_teams_id_fk", + "tableFrom": "draft_picks", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "draft_picks_participant_id_participants_id_fk": { + "name": "draft_picks_participant_id_participants_id_fk", + "tableFrom": "draft_picks", + "tableTo": "participants", + "columnsFrom": [ + "participant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.draft_queue": { + "name": "draft_queue", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "season_id": { + "name": "season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "team_id": { + "name": "team_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "participant_id": { + "name": "participant_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "queue_position": { + "name": "queue_position", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "draft_queue_season_id_seasons_id_fk": { + "name": "draft_queue_season_id_seasons_id_fk", + "tableFrom": "draft_queue", + "tableTo": "seasons", + "columnsFrom": [ + "season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "draft_queue_team_id_teams_id_fk": { + "name": "draft_queue_team_id_teams_id_fk", + "tableFrom": "draft_queue", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "draft_queue_participant_id_participants_id_fk": { + "name": "draft_queue_participant_id_participants_id_fk", + "tableFrom": "draft_queue", + "tableTo": "participants", + "columnsFrom": [ + "participant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.draft_slots": { + "name": "draft_slots", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "season_id": { + "name": "season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "team_id": { + "name": "team_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "draft_order": { + "name": "draft_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "draft_slots_season_id_seasons_id_fk": { + "name": "draft_slots_season_id_seasons_id_fk", + "tableFrom": "draft_slots", + "tableTo": "seasons", + "columnsFrom": [ + "season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "draft_slots_team_id_teams_id_fk": { + "name": "draft_slots_team_id_teams_id_fk", + "tableFrom": "draft_slots", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.draft_timers": { + "name": "draft_timers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "season_id": { + "name": "season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "team_id": { + "name": "team_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "time_remaining": { + "name": "time_remaining", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "draft_timers_season_id_seasons_id_fk": { + "name": "draft_timers_season_id_seasons_id_fk", + "tableFrom": "draft_timers", + "tableTo": "seasons", + "columnsFrom": [ + "season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "draft_timers_team_id_teams_id_fk": { + "name": "draft_timers_team_id_teams_id_fk", + "tableFrom": "draft_timers", + "tableTo": "teams", + "columnsFrom": [ + "team_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.leagues": { + "name": "leagues", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "current_season_id": { + "name": "current_season_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.participant_results": { + "name": "participant_results", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "participant_id": { + "name": "participant_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "sports_season_id": { + "name": "sports_season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "final_position": { + "name": "final_position", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "points_awarded": { + "name": "points_awarded", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "qualifying_points": { + "name": "qualifying_points", + "type": "numeric(10, 2)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "participant_results_participant_id_participants_id_fk": { + "name": "participant_results_participant_id_participants_id_fk", + "tableFrom": "participant_results", + "tableTo": "participants", + "columnsFrom": [ + "participant_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "participant_results_sports_season_id_sports_seasons_id_fk": { + "name": "participant_results_sports_season_id_sports_seasons_id_fk", + "tableFrom": "participant_results", + "tableTo": "sports_seasons", + "columnsFrom": [ + "sports_season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.participants": { + "name": "participants", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sports_season_id": { + "name": "sports_season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "short_name": { + "name": "short_name", + "type": "varchar(100)", + "primaryKey": false, + "notNull": false + }, + "external_id": { + "name": "external_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "expected_value": { + "name": "expected_value", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "participants_sports_season_id_sports_seasons_id_fk": { + "name": "participants_sports_season_id_sports_seasons_id_fk", + "tableFrom": "participants", + "tableTo": "sports_seasons", + "columnsFrom": [ + "sports_season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.season_sports": { + "name": "season_sports", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "season_id": { + "name": "season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "sports_season_id": { + "name": "sports_season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "season_sports_season_id_seasons_id_fk": { + "name": "season_sports_season_id_seasons_id_fk", + "tableFrom": "season_sports", + "tableTo": "seasons", + "columnsFrom": [ + "season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "season_sports_sports_season_id_sports_seasons_id_fk": { + "name": "season_sports_sports_season_id_sports_seasons_id_fk", + "tableFrom": "season_sports", + "tableTo": "sports_seasons", + "columnsFrom": [ + "sports_season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.season_template_sports": { + "name": "season_template_sports", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "sports_season_id": { + "name": "sports_season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "season_template_sports_template_id_season_templates_id_fk": { + "name": "season_template_sports_template_id_season_templates_id_fk", + "tableFrom": "season_template_sports", + "tableTo": "season_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "season_template_sports_sports_season_id_sports_seasons_id_fk": { + "name": "season_template_sports_sports_season_id_sports_seasons_id_fk", + "tableFrom": "season_template_sports", + "tableTo": "sports_seasons", + "columnsFrom": [ + "sports_season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.season_templates": { + "name": "season_templates", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.seasons": { + "name": "seasons", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "league_id": { + "name": "league_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "season_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pre_draft'" + }, + "template_id": { + "name": "template_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "draft_rounds": { + "name": "draft_rounds", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 20 + }, + "flex_spots": { + "name": "flex_spots", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "draft_date_time": { + "name": "draft_date_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "draft_initial_time": { + "name": "draft_initial_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 120 + }, + "draft_increment_time": { + "name": "draft_increment_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 30 + }, + "current_pick_number": { + "name": "current_pick_number", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 1 + }, + "draft_started_at": { + "name": "draft_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "draft_paused": { + "name": "draft_paused", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "invite_code": { + "name": "invite_code", + "type": "varchar(20)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "seasons_league_id_leagues_id_fk": { + "name": "seasons_league_id_leagues_id_fk", + "tableFrom": "seasons", + "tableTo": "leagues", + "columnsFrom": [ + "league_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "seasons_template_id_season_templates_id_fk": { + "name": "seasons_template_id_season_templates_id_fk", + "tableFrom": "seasons", + "tableTo": "season_templates", + "columnsFrom": [ + "template_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "seasons_invite_code_unique": { + "name": "seasons_invite_code_unique", + "nullsNotDistinct": false, + "columns": [ + "invite_code" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sports": { + "name": "sports", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "sport_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "icon_url": { + "name": "icon_url", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "sports_slug_unique": { + "name": "sports_slug_unique", + "nullsNotDistinct": false, + "columns": [ + "slug" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sports_seasons": { + "name": "sports_seasons", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "sport_id": { + "name": "sport_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "start_date": { + "name": "start_date", + "type": "date", + "primaryKey": false, + "notNull": false + }, + "end_date": { + "name": "end_date", + "type": "date", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "sports_season_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'upcoming'" + }, + "scoring_type": { + "name": "scoring_type", + "type": "scoring_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "sports_seasons_sport_id_sports_id_fk": { + "name": "sports_seasons_sport_id_sports_id_fk", + "tableFrom": "sports_seasons", + "tableTo": "sports", + "columnsFrom": [ + "sport_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.teams": { + "name": "teams", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "season_id": { + "name": "season_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "logo_url": { + "name": "logo_url", + "type": "varchar(512)", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "teams_season_id_seasons_id_fk": { + "name": "teams_season_id_seasons_id_fk", + "tableFrom": "teams", + "tableTo": "seasons", + "columnsFrom": [ + "season_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "clerk_id": { + "name": "clerk_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "first_name": { + "name": "first_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "last_name": { + "name": "last_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "image_url": { + "name": "image_url", + "type": "varchar(512)", + "primaryKey": false, + "notNull": false + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "users_clerk_id_unique": { + "name": "users_clerk_id_unique", + "nullsNotDistinct": false, + "columns": [ + "clerk_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.picked_by_type": { + "name": "picked_by_type", + "schema": "public", + "values": [ + "owner", + "commissioner", + "auto" + ] + }, + "public.scoring_type": { + "name": "scoring_type", + "schema": "public", + "values": [ + "playoffs", + "regular_season", + "majors" + ] + }, + "public.season_status": { + "name": "season_status", + "schema": "public", + "values": [ + "pre_draft", + "draft", + "active", + "completed" + ] + }, + "public.sport_type": { + "name": "sport_type", + "schema": "public", + "values": [ + "team", + "individual" + ] + }, + "public.sports_season_status": { + "name": "sports_season_status", + "schema": "public", + "values": [ + "upcoming", + "active", + "completed" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 59b3e6c..b506590 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -120,6 +120,13 @@ "when": 1760590495868, "tag": "0016_majestic_roulette", "breakpoints": true + }, + { + "idx": 17, + "version": "7", + "when": 1760599350154, + "tag": "0017_calm_zarda", + "breakpoints": true } ] } \ No newline at end of file