diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-10-26 20:11:43 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-10-26 20:11:43 +0300 |
commit | db573943997dee93307acb7978f21494b9fc24a4 (patch) | |
tree | fe998aea40258d2b0934b6ea9b9a5047227086b6 /sql | |
parent | Adopt 'make install' to updated output from 'rebar list-deps' (diff) |
Add SQL support for mod_push
Diffstat (limited to 'sql')
-rw-r--r-- | sql/lite.sql | 11 | ||||
-rw-r--r-- | sql/mssql.sql | 14 | ||||
-rw-r--r-- | sql/mysql.sql | 11 | ||||
-rw-r--r-- | sql/pg.sql | 11 |
4 files changed, 47 insertions, 0 deletions
diff --git a/sql/lite.sql b/sql/lite.sql index 1cc0c4dc5..0789ca45a 100644 --- a/sql/lite.sql +++ b/sql/lite.sql @@ -375,3 +375,14 @@ CREATE TABLE proxy65 ( CREATE UNIQUE INDEX i_proxy65_sid ON proxy65 (sid); CREATE INDEX i_proxy65_jid ON proxy65 (jid_i); + +CREATE TABLE push_session ( + username text NOT NULL, + timestamp bigint NOT NULL, + service text NOT NULL, + node text NOT NULL, + xml text NOT NULL +); + +CREATE UNIQUE INDEX i_push_usn ON push_session (username, service, node); +CREATE UNIQUE INDEX i_push_ut ON push_session (username, timestamp); 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);
diff --git a/sql/mysql.sql b/sql/mysql.sql index e2586853b..4fd70f382 100644 --- a/sql/mysql.sql +++ b/sql/mysql.sql @@ -391,3 +391,14 @@ CREATE TABLE proxy65 ( CREATE UNIQUE INDEX i_proxy65_sid ON proxy65 (sid(191)); CREATE INDEX i_proxy65_jid ON proxy65 (jid_i(191)); + +CREATE TABLE push_session ( + username text NOT NULL, + timestamp bigint NOT NULL, + service text NOT NULL, + node text NOT NULL, + xml text NOT NULL +); + +CREATE UNIQUE INDEX i_push_usn ON push_session (username(191), service(191), node(191)); +CREATE UNIQUE INDEX i_push_ut ON push_session (username(191), timestamp); diff --git a/sql/pg.sql b/sql/pg.sql index f761e68da..e26b1111f 100644 --- a/sql/pg.sql +++ b/sql/pg.sql @@ -395,3 +395,14 @@ CREATE TABLE proxy65 ( CREATE UNIQUE INDEX i_proxy65_sid ON proxy65 USING btree (sid); CREATE INDEX i_proxy65_jid ON proxy65 USING btree (jid_i); + +CREATE TABLE push_session ( + username text NOT NULL, + timestamp bigint NOT NULL, + service text NOT NULL, + node text NOT NULL, + xml text NOT NULL +); + +CREATE UNIQUE INDEX i_push_usn ON push_session USING btree (username, service, node); +CREATE UNIQUE INDEX i_push_ut ON push_session USING btree (username, timestamp); |