diff options
author | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-02-27 13:06:17 +0300 |
---|---|---|
committer | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-02-27 13:06:17 +0300 |
commit | 7511da0f266e61fa12c640bd418606baca4c78ed (patch) | |
tree | ec71e67a273928c7f162f3df3768b39338a373c4 /sql/pg.new.sql | |
parent | Copy p1_time_compat:unique_timestamp() to misc and make use of it (diff) |
Add SQL schemas for MQTT tables
Diffstat (limited to 'sql/pg.new.sql')
-rw-r--r-- | sql/pg.new.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/pg.new.sql b/sql/pg.new.sql index 49544114..c585fd30 100644 --- a/sql/pg.new.sql +++ b/sql/pg.new.sql @@ -625,3 +625,20 @@ CREATE TABLE mix_pam ( CREATE UNIQUE INDEX i_mix_pam ON mix_pam (username, server_host, channel, service); CREATE INDEX i_mix_pam_us ON mix_pam (username, server_host); + +CREATE TABLE mqtt_pub ( + username text NOT NULL, + server_host text NOT NULL, + resource text NOT NULL, + topic text NOT NULL, + qos smallint NOT NULL, + payload bytea NOT NULL, + payload_format smallint NOT NULL, + content_type text NOT NULL, + response_topic text NOT NULL, + correlation_data bytea NOT NULL, + user_properties bytea NOT NULL, + expiry bigint NOT NULL +); + +CREATE UNIQUE INDEX i_mqtt_topic_server ON mqtt_pub (topic, server_host); |