From c2d8bc7b2f52b58b864fab126964724fecb62391 Mon Sep 17 00:00:00 2001 From: Badlop Date: Fri, 11 Jun 2021 16:42:09 +0200 Subject: Add mqtt_pub table definition for MSSQL (#3097) --- sql/mssql.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sql') 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]; -- cgit v1.2.3