fix(channels): sync preserve locally cleared dialogs
This commit is contained in:
parent
e22fac1c3f
commit
73cf6a8184
50 changed files with 1525 additions and 327 deletions
14
deploy/migrations/0161_channel_history_clear_anchor.up.sql
Normal file
14
deploy/migrations/0161_channel_history_clear_anchor.up.sql
Normal 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
|
||||
)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue