Files
webSocketCourse/migrations/0000_slim_shiva.sql
2026-02-04 20:29:42 -06:00

14 lines
479 B
SQL

CREATE TYPE "public"."match_status" AS ENUM('scheduled', 'live', 'finished');--> statement-breakpoint
CREATE TABLE "matches" (
"id" serial PRIMARY KEY NOT NULL,
"sport" text NOT NULL,
"home_team" text NOT NULL,
"away_team" text NOT NULL,
"status" "match_status" DEFAULT 'scheduled' NOT NULL,
"start_time" timestamp,
"end_time" timestamp,
"home_score" integer DEFAULT 0 NOT NULL,
"away_score" integer DEFAULT 0 NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);