mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
chat item status, CRChatItemUpdated api response (#269)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Migrations.M20220205_chat_item_status where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20220205_chat_item_status :: Query
|
||||
m20220205_chat_item_status =
|
||||
[sql|
|
||||
PRAGMA ignore_check_constraints=ON;
|
||||
|
||||
ALTER TABLE chat_items ADD COLUMN item_status TEXT CHECK (item_status NOT NULL);
|
||||
|
||||
UPDATE chat_items SET item_status = 'rcv_read' WHERE item_sent = 0;
|
||||
|
||||
UPDATE chat_items SET item_status = 'snd_sent' WHERE item_sent = 1;
|
||||
|
||||
PRAGMA ignore_check_constraints=OFF;
|
||||
|]
|
||||
Reference in New Issue
Block a user