core: api to differentiate contacts and conversations (#4111)

This commit is contained in:
spaced4ndy
2024-05-13 16:51:54 +04:00
committed by GitHub
parent 06d61ea73e
commit f40ba6f04d
15 changed files with 164 additions and 46 deletions
@@ -0,0 +1,18 @@
{-# LANGUAGE QuasiQuotes #-}
module Simplex.Chat.Migrations.M20240501_chat_deleted where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20240501_chat_deleted :: Query
m20240501_chat_deleted =
[sql|
ALTER TABLE contacts ADD COLUMN chat_deleted INTEGER NOT NULL DEFAULT 0;
|]
down_m20240501_chat_deleted :: Query
down_m20240501_chat_deleted =
[sql|
ALTER TABLE contacts DROP COLUMN chat_deleted;
|]
@@ -76,6 +76,7 @@ CREATE TABLE contacts(
contact_status TEXT NOT NULL DEFAULT 'active',
custom_data BLOB,
ui_themes TEXT,
chat_deleted INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY(user_id, local_display_name)
REFERENCES display_names(user_id, local_display_name)
ON DELETE CASCADE