chore: refresh gramsrv public release

This commit is contained in:
A 2026-06-30 14:37:43 +08:00
parent 75cebe8dbf
commit 70b6820474
1274 changed files with 378751 additions and 59919 deletions

View file

@ -0,0 +1,13 @@
-- New channel Star gifts are saved-gift/admin-log records, not channel history
-- messages, so channel gifts may have msg_id = 0. The >= 0 branch keeps older
-- rows migratable without rewriting already persisted data.
ALTER TABLE public.peer_star_gifts
DROP CONSTRAINT IF EXISTS peer_star_gifts_ref_check;
ALTER TABLE public.peer_star_gifts
ADD CONSTRAINT peer_star_gifts_ref_check CHECK (
(owner_peer_type = 'user' AND msg_id > 0 AND saved_id = 0)
OR
(owner_peer_type = 'channel' AND msg_id >= 0 AND saved_id > 0)
);