core: mark chats as favorite (#2591)

This commit is contained in:
Evgeny Poberezkin
2023-06-18 12:46:38 +01:00
committed by GitHub
parent e1370e8f3c
commit 5c105cb746
11 changed files with 77 additions and 42 deletions
+3 -1
View File
@@ -64,6 +64,7 @@ CREATE TABLE contacts(
user_preferences TEXT DEFAULT '{}' CHECK(user_preferences NOT NULL),
chat_ts TEXT,
deleted INTEGER NOT NULL DEFAULT 0,
favorite INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY(user_id, local_display_name)
REFERENCES display_names(user_id, local_display_name)
ON DELETE CASCADE
@@ -135,7 +136,8 @@ CREATE TABLE groups(
enable_ntfs INTEGER,
host_conn_custom_user_profile_id INTEGER REFERENCES contact_profiles ON DELETE SET NULL,
unread_chat INTEGER DEFAULT 0 CHECK(unread_chat NOT NULL),
chat_ts TEXT, -- received
chat_ts TEXT,
favorite INTEGER NOT NULL DEFAULT 0, -- received
FOREIGN KEY(user_id, local_display_name)
REFERENCES display_names(user_id, local_display_name)
ON DELETE CASCADE