From dea5c6478a890f7bb48083c8d60bc39143512a84 Mon Sep 17 00:00:00 2001 From: Efim Poberezkin Date: Mon, 28 Dec 2020 23:32:05 +0400 Subject: [PATCH] change fields to blobs --- .../Messaging/Agent/Store/SQLite/Schema.hs | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Simplex/Messaging/Agent/Store/SQLite/Schema.hs b/src/Simplex/Messaging/Agent/Store/SQLite/Schema.hs index 49d92e44e..a67c1c36c 100644 --- a/src/Simplex/Messaging/Agent/Store/SQLite/Schema.hs +++ b/src/Simplex/Messaging/Agent/Store/SQLite/Schema.hs @@ -16,17 +16,18 @@ servers = \ host_address TEXT\ \ )" +-- TODO unique constraints on (server_id, rcv_id) and (server_id, snd_id) recipientQueues :: Query recipientQueues = "CREATE TABLE IF NOT EXISTS recipient_queues\ \ ( recipient_queue_id INTEGER PRIMARY KEY,\ \ server_id INTEGER REFERENCES servers(server_id),\ - \ rcv_id TEXT,\ - \ rcv_private_key TEXT,\ - \ snd_id TEXT,\ - \ snd_key TEXT,\ - \ decrypt_key TEXT,\ - \ verify_key TEXT,\ + \ rcv_id BLOB,\ + \ rcv_private_key BLOB,\ + \ snd_id BLOB,\ + \ snd_key BLOB,\ + \ decrypt_key BLOB,\ + \ verify_key BLOB,\ \ status TEXT,\ \ ack_mode INTEGER\ \ )" @@ -36,10 +37,10 @@ senderQueues = "CREATE TABLE IF NOT EXISTS sender_queues\ \ ( sender_queue_id INTEGER PRIMARY KEY,\ \ server_id INTEGER REFERENCES servers(server_id),\ - \ snd_id TEXT,\ - \ snd_private_key TEXT,\ - \ encrypt_key TEXT,\ - \ sign_key TEXT,\ + \ snd_id BLOB,\ + \ snd_private_key BLOB,\ + \ encrypt_key BLOB,\ + \ sign_key BLOB,\ \ status TEXT,\ \ ack_mode INTEGER\ \ )"