diff options
author | Mario <mario@mariovavti.com> | 2024-01-07 20:34:47 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-01-07 20:34:47 +0000 |
commit | ca216ae819646191f13053b4211dd7c52a25e676 (patch) | |
tree | e9dd50b28e76eba37d8ebf8dd3e16887ff91cf21 /Zotlabs/Update | |
parent | 4713241444ca045c38c4d855a7e597be58c043df (diff) | |
download | volse-hubzilla-ca216ae819646191f13053b4211dd7c52a25e676.tar.gz volse-hubzilla-ca216ae819646191f13053b4211dd7c52a25e676.tar.bz2 volse-hubzilla-ca216ae819646191f13053b4211dd7c52a25e676.zip |
set default value for postgres only
Diffstat (limited to 'Zotlabs/Update')
-rw-r--r-- | Zotlabs/Update/_1260.php | 10 | ||||
-rw-r--r-- | Zotlabs/Update/_1261.php | 4 |
2 files changed, 10 insertions, 4 deletions
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) { diff --git a/Zotlabs/Update/_1261.php b/Zotlabs/Update/_1261.php index f99c49ebd..43fd0b098 100644 --- a/Zotlabs/Update/_1261.php +++ b/Zotlabs/Update/_1261.php @@ -20,12 +20,12 @@ class _1261 { dbq("START TRANSACTION"); - $r1 = dbq("ALTER TABLE xchan ADD xchan_epubkey text NOT NULL DEFAULT ''"); - if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = dbq("ALTER TABLE xchan ADD xchan_epubkey text NOT NULL DEFAULT ''"); $r2 = dbq("ALTER TABLE xchan ADD xchan_updated timestamp NOT NULL DEFAULT '0001-01-01 00:00:00'"); } else { + $r1 = dbq("ALTER TABLE xchan ADD xchan_epubkey text NOT NULL"); $r2 = dbq("ALTER TABLE xchan ADD xchan_updated datetime NOT NULL DEFAULT '0001-01-01 00:00:00'"); } |