fix(channels): sync preserve locally cleared dialogs

This commit is contained in:
iamxvbaba 2026-07-29 16:19:04 +08:00
parent e22fac1c3f
commit 73cf6a8184
50 changed files with 1525 additions and 327 deletions

View file

@ -0,0 +1,14 @@
ALTER TABLE channel_members
ADD COLUMN history_clear_anchor_id integer DEFAULT 0 NOT NULL,
ADD COLUMN history_clear_anchor_date integer DEFAULT 0 NOT NULL,
ADD CONSTRAINT channel_members_history_clear_anchor_check CHECK (
(
history_clear_anchor_id = 0
AND history_clear_anchor_date = 0
)
OR (
history_clear_anchor_id > 0
AND history_clear_anchor_date > 0
AND history_clear_anchor_id <= available_min_id
)
);