From ca216ae819646191f13053b4211dd7c52a25e676 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 7 Jan 2024 20:34:47 +0000 Subject: set default value for postgres only --- Zotlabs/Update/_1260.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Update/_1260.php') diff --git a/Zotlabs/Update/_1260.php b/Zotlabs/Update/_1260.php index eac2bae8b..7f91418f6 100644 --- a/Zotlabs/Update/_1260.php +++ b/Zotlabs/Update/_1260.php @@ -18,8 +18,14 @@ class _1260 { dbq("START TRANSACTION"); - $r1 = dbq("ALTER TABLE channel ADD channel_epubkey text NOT NULL DEFAULT ''"); - $r2 = dbq("ALTER TABLE channel ADD channel_eprvkey text NOT NULL DEFAULT ''"); + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = dbq("ALTER TABLE channel ADD channel_epubkey text NOT NULL DEFAULT ''"); + $r2 = dbq("ALTER TABLE channel ADD channel_eprvkey text NOT NULL DEFAULT ''"); + } + else { + $r1 = dbq("ALTER TABLE channel ADD channel_epubkey text NOT NULL"); + $r2 = dbq("ALTER TABLE channel ADD channel_eprvkey text NOT NULL"); + } $channels = dbq("select channel_id from channel where true"); if ($channels) { -- cgit v1.2.3