From db573943997dee93307acb7978f21494b9fc24a4 Mon Sep 17 00:00:00 2001
From: Evgeniy Khramtsov <ekhramtsov@process-one.net>
Date: Thu, 26 Oct 2017 20:11:43 +0300
Subject: Add SQL support for mod_push

---
 sql/mssql.sql | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

(limited to 'sql/mssql.sql')

diff --git a/sql/mssql.sql b/sql/mssql.sql
index 607acae8f..6f309487a 100644
--- a/sql/mssql.sql
+++ b/sql/mssql.sql
@@ -541,3 +541,17 @@ WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW
 
 CREATE INDEX [carboncopy_user] ON [carboncopy] (username)
 WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON);
+
+CREATE TABLE [dbo].[push_session] (
+    [username] [varchar] (255) NOT NULL,
+    [timestamp] [bigint] NOT NULL,
+    [service] [varchar] (255) NOT NULL,
+    [node] [varchar] (255) NOT NULL,
+    [xml] [varchar] (255) NOT NULL
+);
+
+CREATE UNIQUE CLUSTERED INDEX [i_push_usn] ON [push_session] (username, service, node)
+WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON);
+
+CREATE UNIQUE CLUSTERED INDEX [i_push_ut] ON [push_session] (username, timestamp)
+WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON);
-- 
cgit v1.2.3

