diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-05-03 21:50:34 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-05-03 21:50:34 -0400 |
commit | e4a2aacd1d2f852264319aff848257349575131e (patch) | |
tree | a0d25ece0130fce219cc4df6950f7ab5d41b5c7b /install/update.php | |
parent | 5686ee13b4540bfc0ce6c40f07b6e43c3c55e9a8 (diff) | |
parent | 45c7a03a0d3e534ee121a632fc279c353015b876 (diff) | |
download | volse-hubzilla-e4a2aacd1d2f852264319aff848257349575131e.tar.gz volse-hubzilla-e4a2aacd1d2f852264319aff848257349575131e.tar.bz2 volse-hubzilla-e4a2aacd1d2f852264319aff848257349575131e.zip |
Merge remote-tracking branch 'upstream/dev' into plugin-repo
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index b8e20786c..ea1bd8bc7 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1167 ); +define( 'UPDATE_VERSION' , 1168 ); /** * @@ -2079,4 +2079,21 @@ function update_r1166() { return UPDATE_FAILED; } +function update_r1167() { + $r1 = q("alter table app add app_deleted int not null default '0' "); + $r2 = q("alter table app add app_system int not null default '0' "); + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r3 = q("create index \"app_deleted_idx\" on app (\"app_deleted\") "); + $r4 = q("create index \"app_system_idx\" on app (\"app_system\") "); + } + else { + $r3 = q("alter table app add index ( app_deleted ) "); + $r4 = q("alter table app add index ( app_system ) "); + } + + if($r1 && $r2 && $r3 && $r4) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |