diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-17 19:00:15 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-17 19:00:15 +0200 |
commit | c0794a83b490031590bc1488b3f15a0cb4f7a2e4 (patch) | |
tree | 636280a41c30bc1723ac62e90ae7fedb4d7cb12f /Zotlabs | |
parent | dcd636f7be5b3f2f6fa32bc77cec4230e5bfcd2d (diff) | |
parent | 02763811b35eb6be41db8071acb4e07725cac697 (diff) | |
download | volse-hubzilla-c0794a83b490031590bc1488b3f15a0cb4f7a2e4.tar.gz volse-hubzilla-c0794a83b490031590bc1488b3f15a0cb4f7a2e4.tar.bz2 volse-hubzilla-c0794a83b490031590bc1488b3f15a0cb4f7a2e4.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Update/_1211.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1211.php b/Zotlabs/Update/_1211.php new file mode 100644 index 000000000..739a5670d --- /dev/null +++ b/Zotlabs/Update/_1211.php @@ -0,0 +1,26 @@ +<?php + +namespace Zotlabs\Update; + +class _1211 { + + function run() { + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("ALTER TABLE channel ADD channel_active timestamp NOT NULL DEFAULT '0001-01-01 00:00:00' "); + $r2 = q("create index \"channel_active\" on channel_active \"channel_active\""); + + $r = ($r1 && $r2); + } + else { + $r = q("ALTER TABLE `channel` ADD `channel_active` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' , + ADD INDEX `channel_active` (`channel_active`)"); + } + + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + + } + +} |