From f5055137f4855cbf108a2c9f96f1394f5a3a39fe Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tim.dijen@minbzk.nl>
Date: Tue, 1 Oct 2019 14:22:41 +0200
Subject: [PATCH] Restore postgres support

As commented in #1155 1155
---
 modules/saml/lib/SP/LogoutStore.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/saml/lib/SP/LogoutStore.php b/modules/saml/lib/SP/LogoutStore.php
index b4f04a7bf..f60fe2a13 100644
--- a/modules/saml/lib/SP/LogoutStore.php
+++ b/modules/saml/lib/SP/LogoutStore.php
@@ -37,7 +37,7 @@ class LogoutStore
                 case 'pgsql':
                     // This does not affect the NOT NULL constraint
                     $update = ['ALTER TABLE '.$store->prefix.
-                        '_saml_LogoutStore ALTER COLUMN _expire DATETIME'];
+                        '_saml_LogoutStore ALTER COLUMN _expire TIMESTAMP'];
                     break;
                 case  'sqlite':
                     /**
@@ -151,7 +151,7 @@ class LogoutStore
             _authSource VARCHAR('.($store->driver === 'mysql' ? '191' : '255').') NOT NULL,
             _nameId VARCHAR(40) NOT NULL,
             _sessionIndex VARCHAR(50) NOT NULL,
-            _expire DATETIME NOT NULL,
+            _expire ' . ($store->driver === 'pgsql' ? 'TIMESTAMP' : 'DATETIME') . ' NOT NULL,
             _sessionId VARCHAR(50) NOT NULL,
             UNIQUE (_authSource'.($store->driver === 'mysql' ? '(191)' : '').', _nameID, _sessionIndex)
         )';
-- 
GitLab