feat: sync group call livestream support

This commit is contained in:
A 2026-07-06 14:31:19 +08:00
parent 56d995474c
commit f1a27996d3
37 changed files with 2219 additions and 83 deletions

View file

@ -0,0 +1,2 @@
DROP TABLE IF EXISTS group_call_rtmp_keys;
ALTER TABLE group_calls DROP COLUMN IF EXISTS rtmp_stream;

View file

@ -0,0 +1,10 @@
-- Live StreamRTMP 直播group_calls 增加 rtmp_stream 标记;
-- per-channel 持久 RTMP 推流密钥revoke 轮换后旧 key 立即失效)。
ALTER TABLE group_calls
ADD COLUMN IF NOT EXISTS rtmp_stream boolean DEFAULT false NOT NULL;
CREATE TABLE IF NOT EXISTS group_call_rtmp_keys (
channel_id bigint PRIMARY KEY,
stream_key text NOT NULL,
updated_at integer NOT NULL
);

View file

@ -0,0 +1,2 @@
DROP TABLE IF EXISTS group_call_schedule_subscribers;
ALTER TABLE group_calls DROP COLUMN IF EXISTS schedule_date;

View file

@ -0,0 +1,10 @@
-- Scheduled video chatgroup_calls 增加 schedule_date>0=定时未开始);
-- 开播提醒订阅toggleGroupCallStartSubscription 的 per-user 状态)。
ALTER TABLE group_calls
ADD COLUMN IF NOT EXISTS schedule_date integer DEFAULT 0 NOT NULL;
CREATE TABLE IF NOT EXISTS group_call_schedule_subscribers (
call_id bigint NOT NULL,
user_id bigint NOT NULL,
PRIMARY KEY (call_id, user_id)
);

View file

@ -0,0 +1 @@
ALTER TABLE group_call_participants DROP COLUMN IF EXISTS join_as_channel_id;

View file

@ -0,0 +1,4 @@
-- join_as参与者可以以频道/群本身的身份入会(匿名管理员语义)。
-- 0 = 以本人用户身份;唯一键仍是 (call_id, user_id),换身份 rejoin 为替换。
ALTER TABLE group_call_participants
ADD COLUMN IF NOT EXISTS join_as_channel_id bigint DEFAULT 0 NOT NULL;