mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
core: confirm ttl change to ensure consistent setting (#1587)
* core: confirm ttl change to ensure consistent setting * wip * confirm_pref_pending * xInfo * test api * send confirmPrefProfile * refactor * don't return contact * refactor profile update * refactor further * refactor further * refactor xInfo * refactor xInfo further * refactor
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Migrations.M20221216_contacts_confirm_pref_pending where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20221216_contacts_confirm_pref_pending :: Query
|
||||
m20221216_contacts_confirm_pref_pending =
|
||||
[sql|
|
||||
PRAGMA ignore_check_constraints=ON;
|
||||
|
||||
ALTER TABLE contacts ADD COLUMN confirm_pref_pending INTEGER DEFAULT 0 CHECK (confirm_pref_pending NOT NULL);
|
||||
|
||||
PRAGMA ignore_check_constraints=OFF;
|
||||
|]
|
||||
@@ -60,6 +60,7 @@ CREATE TABLE contacts(
|
||||
unread_chat INTEGER DEFAULT 0 CHECK(unread_chat NOT NULL),
|
||||
contact_used INTEGER DEFAULT 0 CHECK(contact_used NOT NULL),
|
||||
user_preferences TEXT DEFAULT '{}' CHECK(user_preferences NOT NULL),
|
||||
confirm_pref_pending INTEGER DEFAULT 0 CHECK(confirm_pref_pending NOT NULL),
|
||||
FOREIGN KEY(user_id, local_display_name)
|
||||
REFERENCES display_names(user_id, local_display_name)
|
||||
ON DELETE CASCADE
|
||||
|
||||
Reference in New Issue
Block a user