core: call uuid (#4777)

* core: call uuid

* fix

* text

* android, desktop

* ios

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
Stanislav Dmitrenko
2024-08-28 14:31:02 +00:00
committed by GitHub
parent 121eaf6073
commit acb372a4ce
20 changed files with 107 additions and 60 deletions
@@ -0,0 +1,18 @@
{-# LANGUAGE QuasiQuotes #-}
module Simplex.Chat.Migrations.M20240827_calls_uuid where
import Database.SQLite.Simple (Query)
import Database.SQLite.Simple.QQ (sql)
m20240827_calls_uuid :: Query
m20240827_calls_uuid =
[sql|
ALTER TABLE calls ADD COLUMN call_uuid TEXT NOT NULL DEFAULT "";
|]
down_m20240827_calls_uuid :: Query
down_m20240827_calls_uuid =
[sql|
ALTER TABLE calls DROP COLUMN call_uuid;
|]
@@ -415,6 +415,8 @@ CREATE TABLE calls(
user_id INTEGER NOT NULL REFERENCES users ON DELETE CASCADE,
created_at TEXT NOT NULL DEFAULT(datetime('now')),
updated_at TEXT NOT NULL DEFAULT(datetime('now'))
,
call_uuid TEXT NOT NULL DEFAULT ""
);
CREATE TABLE commands(
command_id INTEGER PRIMARY KEY AUTOINCREMENT, -- used as ACorrId