aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-06-11 16:42:09 +0200
committerBadlop <badlop@process-one.net>2021-06-14 12:22:21 +0200
commitc2d8bc7b2f52b58b864fab126964724fecb62391 (patch)
tree59a28888a342fc53abd4856cc3940d247feec4a5 /sql
parentRevert luerl from v0.4 which has a compilation warning; v0.3 is enough (diff)
Add mqtt_pub table definition for MSSQL (#3097)
Diffstat (limited to 'sql')
-rw-r--r--sql/mssql.sql20
1 files changed, 20 insertions, 0 deletions
diff --git a/sql/mssql.sql b/sql/mssql.sql
index 3d7690f8a..bb7861527 100644
--- a/sql/mssql.sql
+++ b/sql/mssql.sql
@@ -544,3 +544,23 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW
CREATE UNIQUE INDEX [i_push_ut] ON [push_session] (username, timestamp)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON);
+
+CREATE TABLE [dbo].[mqtt_pub](
+ [username] [varchar](191) NOT NULL,
+ [server_host] [varchar](191) NOT NULL,
+ [resource] [varchar](191) NOT NULL,
+ [topic] [varchar](191) NOT NULL,
+ [qos] [tinyint] NOT NULL,
+ [payload] [varbinary](max) NOT NULL,
+ [payload_format] [tinyint] NOT NULL,
+ [content_type] [text] NOT NULL,
+ [response_topic] [text] NOT NULL,
+ [correlation_data] [varbinary](max) NOT NULL,
+ [user_properties] [varbinary](max) NOT NULL,
+ [expiry] [int] NOT NULL,
+ CONSTRAINT [i_mqtt_topic_server] PRIMARY KEY CLUSTERED
+(
+ [topic] ASC,
+ [server_host] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
+) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];