diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-05-28 14:12:53 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-05-28 14:12:53 -0400 |
commit | 55b587002ea7e892d20010800f5892949f56d34a (patch) | |
tree | 6d18c9e255a3869d3636e628bec68123b4191ae0 /install/update.php | |
parent | 819683a073f85b05807d6c936a2b746296fc8de4 (diff) | |
parent | ac4688eac087854bf8cb0c893d7a79052ad63a20 (diff) | |
download | volse-hubzilla-55b587002ea7e892d20010800f5892949f56d34a.tar.gz volse-hubzilla-55b587002ea7e892d20010800f5892949f56d34a.tar.bz2 volse-hubzilla-55b587002ea7e892d20010800f5892949f56d34a.zip |
Merge remote-tracking branch 'upstream/dev' into wiki
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 ea1bd8bc7..983db1bb9 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1168 ); +define( 'UPDATE_VERSION' , 1169 ); /** * @@ -2097,3 +2097,20 @@ function update_r1167() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + +function update_r1168() { + + $r1 = q("alter table obj add obj_quantity int not null default '0' "); + + if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { + $r2 = q("create index \"obj_quantity_idx\" on obj (\"obj_quantity\") "); + } + else { + $r2 = q("alter table obj add index ( obj_quantity ) "); + } + + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} + |