mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-10-22 09:12:17 +00:00
add agent ddl draft
This commit is contained in:
1 file changed
+38
-5
@@ -18,15 +18,48 @@ createSchema conn =
|
||||
recipientQueues :: Query
|
||||
recipientQueues =
|
||||
"CREATE TABLE IF NOT EXISTS recipient_queues\
|
||||
\ ( id INTEGER PRIMARY KEY,\
|
||||
\ rcvId TEXT\
|
||||
\ ( recipient_queue_id INTEGER PRIMARY KEY,\
|
||||
\ server TEXT,\
|
||||
\ rcv_id TEXT,\
|
||||
\ rcv_private_key TEXT,\
|
||||
\ snd_id TEXT,\
|
||||
\ snd_key TEXT,\
|
||||
\ decrypt_key TEXT,\
|
||||
\ verify_key TEXT,\
|
||||
\ status TEXT,\
|
||||
\ ack_mode INTEGER\
|
||||
\ )"
|
||||
|
||||
senderQueues :: Query
|
||||
senderQueues = ""
|
||||
senderQueues =
|
||||
"CREATE TABLE IF NOT EXISTS sender_queues\
|
||||
\ ( sender_queue_id INTEGER PRIMARY KEY,\
|
||||
\ server TEXT,\
|
||||
\ snd_id TEXT,\
|
||||
\ snd_private_key TEXT,\
|
||||
\ encrypt_key TEXT,\
|
||||
\ sign_key TEXT,\
|
||||
\ status TEXT,\
|
||||
\ ack_mode INTEGER\
|
||||
\ )"
|
||||
|
||||
connections :: Query
|
||||
connections = ""
|
||||
connections =
|
||||
"CREATE TABLE IF NOT EXISTS connections\
|
||||
\ ( connection_id INTEGER PRIMARY KEY,\
|
||||
\ conn_alias TEXT UNIQUE,\
|
||||
\ recipient_queue_id INTEGER REFERENCES recipient_queues(recipient_queue_id),\
|
||||
\ sender_queue_id INTEGER REFERENCES sender_queues(sender_queue_id)\
|
||||
\ )"
|
||||
|
||||
messages :: Query
|
||||
messages = ""
|
||||
messages =
|
||||
"CREATE TABLE IF NOT EXISTS messages\
|
||||
\ ( message_id INTEGER PRIMARY KEY,\
|
||||
\ conn_alias TEXT REFERENCES connections(conn_alias),\
|
||||
\ agent_msg_id INTEGER,\
|
||||
\ timestamp TEXT,\
|
||||
\ message TEXT,\
|
||||
\ direction TEXT,\
|
||||
\ msg_status TEXT\
|
||||
\ )"
|
||||
Reference in new issue
Block a user