core: deleted timestamps for chat item (#2459)

* core: edited and deleted timestamps for item

* migration

* add deleted timestamp to chat item, use chat item if there are no versions

* use broker timestamp for remote deletions

* refactor
This commit is contained in:
Evgeny Poberezkin
2023-05-19 14:52:51 +02:00
committed by GitHub
parent f155611d29
commit 9978957e6c
9 changed files with 138 additions and 83 deletions
+2 -1
View File
@@ -377,7 +377,8 @@ CREATE TABLE chat_items(
timed_ttl INTEGER,
timed_delete_at TEXT,
item_live INTEGER,
item_deleted_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL
item_deleted_by_group_member_id INTEGER REFERENCES group_members ON DELETE SET NULL,
item_deleted_ts TEXT
);
CREATE TABLE chat_item_messages(
chat_item_id INTEGER NOT NULL REFERENCES chat_items ON DELETE CASCADE,