From 76c49f314f3c8422ed3f60dc5b5f8ce14340b4cb Mon Sep 17 00:00:00 2001
From: pitchum <pitchum@users.noreply.github.com>
Date: Sun, 1 Aug 2021 09:53:07 +0200
Subject: Add missing SQL migration for table push_session

---
 sql/pg.new.sql | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'sql/pg.new.sql')

diff --git a/sql/pg.new.sql b/sql/pg.new.sql
index 8a35ec6c9..b3473a1a0 100644
--- a/sql/pg.new.sql
+++ b/sql/pg.new.sql
@@ -156,6 +156,12 @@
 -- CREATE INDEX i_sm_sh_username ON sm USING btree (server_host, username);
 -- ALTER TABLE sm ALTER COLUMN server_host DROP DEFAULT;
 
+-- ALTER TABLE push_session ADD COLUMN server_host text NOT NULL DEFAULT '<HOST>';
+-- DROP INDEX i_push_usn;
+-- DROP INDEX i_push_ut;
+-- ALTER TABLE push_session ADD PRIMARY KEY (server_host, username, timestamp);
+-- CREATE UNIQUE INDEX i_push_session_susn ON push_session USING btree (server_host, username, service, node);
+
 
 CREATE TABLE users (
     username text NOT NULL,
-- 
cgit v1.2.3

