Files
esports/scripts/migrations/0008-broadcast.sql

14 lines
503 B
SQL

-- Stream channels: what an overlay shows and how it is laid out.
CREATE TABLE IF NOT EXISTS broadcast_channel (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
name text NOT NULL,
mode text NOT NULL DEFAULT 'auto',
match_id uuid REFERENCES match(id) ON DELETE SET NULL,
tournament_id uuid REFERENCES tournament(id) ON DELETE CASCADE,
layout jsonb NOT NULL,
agent_token_hash text,
created_by text,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now()
);