diff options
author | zottel <github@zottel.net> | 2015-09-03 12:51:08 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2015-09-03 12:51:08 +0200 |
commit | 015c7243b9b688acda9c1defce9055fe2c3c2e61 (patch) | |
tree | 92dd58c4e5a1881b01acb414ea1d218d77ef4721 /install/update.php | |
parent | d376d2a5908241082f2e91349c9100d41054f5d0 (diff) | |
parent | f3cb17ac3b007afd2dc5bf7cdad8a054b4d7fcd8 (diff) | |
download | volse-hubzilla-015c7243b9b688acda9c1defce9055fe2c3c2e61.tar.gz volse-hubzilla-015c7243b9b688acda9c1defce9055fe2c3c2e61.tar.bz2 volse-hubzilla-015c7243b9b688acda9c1defce9055fe2c3c2e61.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
include/zot.php
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php index d0ea4d147..8e531b595 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1150 ); +define( 'UPDATE_VERSION' , 1151 ); /** * @@ -1775,4 +1775,26 @@ function update_r1149() { return UPDATE_SUCCESS; return UPDATE_FAILED; -}
\ No newline at end of file +} + +function update_r1150() { + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r1 = q("ALTER TABLE app ADD app_created timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', + ADD app_edited timestamp NOT NULL DEFAULT '0001-01-01 00:00:00' "); + } + else { + $r1 = q("ALTER TABLE app ADD app_created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', + ADD app_edited DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' "); + } + + $r2 = q("create index app_created on app ( app_created ) "); + $r3 = q("create index app_edited on app ( app_edited ) "); + + $r = $r1 && $r2 && $r3; + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; + +} + |