openvibers/openvibe.live Commits
Migrations: the Rundown's audiences are 0030 (two 0029s on main) (#644)
Changes
@@@ -152,7 +152,7 @@ Migration `0010_rundown.sql`:- `rundown_progress`: how far the desk has read each stream.- `rundown_reactions`: readers' reactions.--Migration `0029_rundown_audiences.sql` (expand only, 2026-11-06) holds what the sharing system does not know:++Migration `0030_rundown_audiences.sql` (expand only, 2026-11-06) holds what the sharing system does not know:- `rundown_visibility`: per stream, what the recording decides as the last thing Live heard about it (`vod_audience`, and `vod_members` for Specific people, which Media has no notion of). A stream with no row is Everyone.- `rundown_prefs`: the streamer's default audience for new write-ups. No row is Everyone.ddeleted file mode 100644@@@ -1,38 +0,0 @@--CREATE TABLE IF NOT EXISTS rundown_visibility (-- stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,-- vod_audience text COLLATE "C" NOT NULL DEFAULT 'public',-- vod_members jsonb NOT NULL DEFAULT '[]'::jsonb CHECK (vod_audience IN ('public','link','people','private')),-- updated_at text COLLATE "C" DEFAULT ov_now()--);----CREATE TABLE IF NOT EXISTS rundown_prefs (-- user_id bigint PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,-- default_audience text COLLATE "C" NOT NULL DEFAULT 'public' CHECK (default_audience IN ('public','link','people','private')),-- updated_at text COLLATE "C" DEFAULT ov_now()--);----CREATE TABLE IF NOT EXISTS rundown_deleted (-- stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,-- user_id bigint NOT NULL,-- deleted_at text COLLATE "C" DEFAULT ov_now()--);nnew file mode 100644@@@ -0,0 +1,38 @@++-- phase: expand++-- The audiences of The Rundown (design 2026-11-06, plan-state-2026-10-22/RUNDOWN-CONTROLS-AND-BROWSE-DESIGN-2026-11-06.md).++--++-- Who sees a streamer's Rundown is one setting, not four: Everyone, Anyone with the link, Specific people or Only me.++-- Those are the sharing system's own audiences (openvibe-sdk/share, share.v1), and the episode's own setting lives++-- there, in the share row of kind 'rundown-episode' (server/rundown/sharing.js). This table holds only what the++-- sharing system does not know:++--++-- vod_audience what the recording decides, as the last thing Live heard about it. Live applies the rule itself:++-- the episode's audience is the stricter of its own setting and this (Only me, then Specific people,++-- then Anyone with the link, then Everyone). A change made through Live's own pages is applied in the++-- same request (server/media-proxy/vods.js); a change made elsewhere arrives as Media's++-- media.object.visibility_changed event; until that lands the episode page re-checks the recording++-- through media-client (cached 60 s, server/rundown/visibility.js).++--++-- Expand only: a stream with no row is Everyone, so every older release and every older row keeps working.++CREATE TABLE IF NOT EXISTS rundown_visibility (++ stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,++ vod_audience text COLLATE "C" NOT NULL DEFAULT 'public',++ vod_members jsonb NOT NULL DEFAULT '[]'::jsonb CHECK (vod_audience IN ('public','link','people','private')),++ updated_at text COLLATE "C" DEFAULT ov_now()++);++++-- The streamer's own default for the episodes written up for them ("My Rundown" settings). Nobody has a row until++-- they change it: no row is Everyone.++CREATE TABLE IF NOT EXISTS rundown_prefs (++ user_id bigint PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,++ default_audience text COLLATE "C" NOT NULL DEFAULT 'public' CHECK (default_audience IN ('public','link','people','private')),++ updated_at text COLLATE "C" DEFAULT ov_now()++);++++-- A write-up the streamer deleted. The desk must not write that stream up again on its own; only the streamer asking++-- for it ("Write this stream up again") clears the row.++CREATE TABLE IF NOT EXISTS rundown_deleted (++ stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,++ user_id bigint NOT NULL,++ deleted_at text COLLATE "C" DEFAULT ov_now()++);
@@ -152,7 +152,7 @@ Migration `0010_rundown.sql`:
@@ -152,7 +152,7 @@ Migration `0010_rundown.sql`:
- `rundown_progress`: how far the desk has read each stream.
- `rundown_progress`: how far the desk has read each stream.
- `rundown_reactions`: readers' reactions.
- `rundown_reactions`: readers' reactions.
-Migration `0029_rundown_audiences.sql` (expand only, 2026-11-06) holds what the sharing system does not know:
+Migration `0030_rundown_audiences.sql` (expand only, 2026-11-06) holds what the sharing system does not know:
- `rundown_visibility`: per stream, what the recording decides as the last thing Live heard about it (`vod_audience`, and `vod_members` for Specific people, which Media has no notion of). A stream with no row is Everyone.
- `rundown_visibility`: per stream, what the recording decides as the last thing Live heard about it (`vod_audience`, and `vod_members` for Specific people, which Media has no notion of). A stream with no row is Everyone.
- `rundown_prefs`: the streamer's default audience for new write-ups. No row is Everyone.
- `rundown_prefs`: the streamer's default audience for new write-ups. No row is Everyone.
deleted file mode 100644
deleted file mode 100644
@@ -1,38 +0,0 @@
@@ -1,38 +0,0 @@
-CREATE TABLE IF NOT EXISTS rundown_visibility (
- stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,
- vod_audience text COLLATE "C" NOT NULL DEFAULT 'public',
- vod_members jsonb NOT NULL DEFAULT '[]'::jsonb CHECK (vod_audience IN ('public','link','people','private')),
- updated_at text COLLATE "C" DEFAULT ov_now()
-);
-
-CREATE TABLE IF NOT EXISTS rundown_prefs (
- user_id bigint PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
- default_audience text COLLATE "C" NOT NULL DEFAULT 'public' CHECK (default_audience IN ('public','link','people','private')),
- updated_at text COLLATE "C" DEFAULT ov_now()
-);
-
-CREATE TABLE IF NOT EXISTS rundown_deleted (
- stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,
- user_id bigint NOT NULL,
- deleted_at text COLLATE "C" DEFAULT ov_now()
-);
new file mode 100644
new file mode 100644
@@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
+-- phase: expand
+-- The audiences of The Rundown (design 2026-11-06, plan-state-2026-10-22/RUNDOWN-CONTROLS-AND-BROWSE-DESIGN-2026-11-06.md).
+--
+-- Who sees a streamer's Rundown is one setting, not four: Everyone, Anyone with the link, Specific people or Only me.
+-- Those are the sharing system's own audiences (openvibe-sdk/share, share.v1), and the episode's own setting lives
+-- there, in the share row of kind 'rundown-episode' (server/rundown/sharing.js). This table holds only what the
+-- sharing system does not know:
+--
+-- vod_audience what the recording decides, as the last thing Live heard about it. Live applies the rule itself:
+-- the episode's audience is the stricter of its own setting and this (Only me, then Specific people,
+-- then Anyone with the link, then Everyone). A change made through Live's own pages is applied in the
+-- same request (server/media-proxy/vods.js); a change made elsewhere arrives as Media's
+-- media.object.visibility_changed event; until that lands the episode page re-checks the recording
+-- through media-client (cached 60 s, server/rundown/visibility.js).
+--
+-- Expand only: a stream with no row is Everyone, so every older release and every older row keeps working.
+CREATE TABLE IF NOT EXISTS rundown_visibility (
+ stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,
+ vod_audience text COLLATE "C" NOT NULL DEFAULT 'public',
+ vod_members jsonb NOT NULL DEFAULT '[]'::jsonb CHECK (vod_audience IN ('public','link','people','private')),
+ updated_at text COLLATE "C" DEFAULT ov_now()
+);
+
+-- The streamer's own default for the episodes written up for them ("My Rundown" settings). Nobody has a row until
+-- they change it: no row is Everyone.
+CREATE TABLE IF NOT EXISTS rundown_prefs (
+ user_id bigint PRIMARY KEY REFERENCES users(id) ON DELETE CASCADE,
+ default_audience text COLLATE "C" NOT NULL DEFAULT 'public' CHECK (default_audience IN ('public','link','people','private')),
+ updated_at text COLLATE "C" DEFAULT ov_now()
+);
+
+-- A write-up the streamer deleted. The desk must not write that stream up again on its own; only the streamer asking
+-- for it ("Write this stream up again") clears the row.
+CREATE TABLE IF NOT EXISTS rundown_deleted (
+ stream_id bigint PRIMARY KEY REFERENCES streams(id) ON DELETE CASCADE,
+ user_id bigint NOT NULL,
+ deleted_at text COLLATE "C" DEFAULT ov_now()
+);