Spaces:
Sleeping
Sleeping
File size: 607 Bytes
a0432b5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | -- Migration: Add stream_coverage table for smart gap detection
-- Run this in Supabase SQL editor
CREATE TABLE IF NOT EXISTS stream_coverage (
id BIGSERIAL PRIMARY KEY,
stream_id INTEGER REFERENCES streams(id) ON DELETE CASCADE,
covered_from TIMESTAMPTZ NOT NULL,
covered_to TIMESTAMPTZ,
source TEXT NOT NULL DEFAULT 'live', -- 'live' | 'backfill' | 'vod_backfiller'
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_stream_coverage_stream_id ON stream_coverage(stream_id);
CREATE INDEX IF NOT EXISTS idx_stream_coverage_covered_from ON stream_coverage(covered_from);
|