mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-11-11 13:58:04 +00:00
smp server: short links and owners for channels (#1506)
* smp server: short links and owners for channels * types * support mutliple rcv keys * fix down migration, test/create server schema dump * reduce schema dump * parameterize type for link data by connection type * return full connection link data * test version * change short link encoding * test: print pg_dump output * server pages, link encoding * fix connection request when queue data and sender ID are created for old servers * test, change pattern * ci: install postgresql tools in runner (#1507) * ci: install postgresql tools in runner * ci: docker shell abort on error * fix pattern for ghc 8.10.7 * patch ConnReqUriData SMP encoding to preserve queue mode after decoding * test for RKEY * fix/test store log with RKEY --------- Co-authored-by: sh <37271604+shumvgolove@users.noreply.github.com>
This commit is contained in:
1 parent
3a3f9fd51e
commit
b7a9542213
32 files changed
+870
-269
No files matched your search
@@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
SET statement_timeout = 0;
|
||||
SET lock_timeout = 0;
|
||||
SET idle_in_transaction_session_timeout = 0;
|
||||
SET client_encoding = 'UTF8';
|
||||
SET standard_conforming_strings = on;
|
||||
SELECT pg_catalog.set_config('search_path', '', false);
|
||||
SET check_function_bodies = false;
|
||||
SET xmloption = content;
|
||||
SET client_min_messages = warning;
|
||||
SET row_security = off;
|
||||
|
||||
|
||||
CREATE SCHEMA smp_server;
|
||||
|
||||
|
||||
SET default_table_access_method = heap;
|
||||
|
||||
|
||||
CREATE TABLE smp_server.migrations (
|
||||
name text NOT NULL,
|
||||
ts timestamp without time zone NOT NULL,
|
||||
down text
|
||||
);
|
||||
|
||||
|
||||
|
||||
CREATE TABLE smp_server.msg_queues (
|
||||
recipient_id bytea NOT NULL,
|
||||
recipient_keys bytea NOT NULL,
|
||||
rcv_dh_secret bytea NOT NULL,
|
||||
sender_id bytea NOT NULL,
|
||||
sender_key bytea,
|
||||
notifier_id bytea,
|
||||
notifier_key bytea,
|
||||
rcv_ntf_dh_secret bytea,
|
||||
status text NOT NULL,
|
||||
updated_at bigint,
|
||||
deleted_at bigint,
|
||||
queue_mode text,
|
||||
link_id bytea,
|
||||
fixed_data bytea,
|
||||
user_data bytea
|
||||
);
|
||||
|
||||
|
||||
|
||||
ALTER TABLE ONLY smp_server.migrations
|
||||
ADD CONSTRAINT migrations_pkey PRIMARY KEY (name);
|
||||
|
||||
|
||||
|
||||
ALTER TABLE ONLY smp_server.msg_queues
|
||||
ADD CONSTRAINT msg_queues_pkey PRIMARY KEY (recipient_id);
|
||||
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_msg_queues_link_id ON smp_server.msg_queues USING btree (link_id);
|
||||
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_msg_queues_notifier_id ON smp_server.msg_queues USING btree (notifier_id);
|
||||
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_msg_queues_sender_id ON smp_server.msg_queues USING btree (sender_id);
|
||||
|
||||
|
||||
|
||||
CREATE INDEX idx_msg_queues_updated_at ON smp_server.msg_queues USING btree (deleted_at, updated_at);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user