Add stream_replays table, related schema, and API endpoints for managing stream replays

This commit is contained in:
Nikita
2025-12-23 23:20:22 -08:00
parent 1bb0450d02
commit 7f6f7d2f37
9 changed files with 643 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
CREATE TABLE "stream_replays" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
"stream_id" uuid NOT NULL REFERENCES "streams"(id) ON DELETE CASCADE,
"user_id" text NOT NULL REFERENCES "users"(id) ON DELETE CASCADE,
"title" text NOT NULL DEFAULT 'Stream Replay',
"description" text,
"status" varchar(32) NOT NULL DEFAULT 'processing',
"jazz_replay_id" text,
"playback_url" text,
"thumbnail_url" text,
"duration_seconds" integer,
"started_at" timestamp with time zone,
"ended_at" timestamp with time zone,
"is_public" boolean NOT NULL DEFAULT false,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);

View File

@@ -29,6 +29,13 @@
"when": 1766456542436,
"tag": "0003_add_webrtc_url_to_streams",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1769000000000,
"tag": "0004_add_stream_replays",
"breakpoints": true
}
]
}