Phase 2: services/mam-api/src/db/schema.sql
This commit is contained in:
parent
53d4124514
commit
cc06166e00
1 changed files with 24 additions and 0 deletions
|
|
@ -133,3 +133,27 @@ CREATE INDEX idx_jobs_type ON jobs(type);
|
|||
CREATE INDEX idx_bins_project_id ON bins(project_id);
|
||||
|
||||
CREATE INDEX idx_sessions_expire ON sessions(expire);
|
||||
|
||||
-- Recorder source types
|
||||
CREATE TYPE source_type AS ENUM ('sdi', 'srt', 'rtmp');
|
||||
|
||||
-- Recorder instances table
|
||||
CREATE TABLE recorders (
|
||||
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
name TEXT NOT NULL,
|
||||
source_type source_type NOT NULL,
|
||||
source_config JSONB NOT NULL DEFAULT '{}',
|
||||
recording_codec TEXT NOT NULL DEFAULT 'prores_hq',
|
||||
recording_resolution TEXT DEFAULT 'native',
|
||||
proxy_enabled BOOLEAN DEFAULT true,
|
||||
proxy_codec TEXT DEFAULT 'libx264',
|
||||
proxy_resolution TEXT DEFAULT '1920x1080',
|
||||
project_id UUID REFERENCES projects,
|
||||
container_id TEXT,
|
||||
status TEXT DEFAULT 'stopped',
|
||||
current_session_id UUID,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX idx_recorders_status ON recorders(status);
|
||||
|
|
|
|||
Loading…
Reference in a new issue