aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-05-27 23:57:47 -0700
committerredmatrix <git@macgirvin.com>2016-05-27 23:57:47 -0700
commitac4688eac087854bf8cb0c893d7a79052ad63a20 (patch)
tree1dba1fae0e25ffe07ccbe4406a2900535429b764 /install/update.php
parentab6eb1c4b264b32e7feece290a2463eb747579ed (diff)
downloadvolse-hubzilla-ac4688eac087854bf8cb0c893d7a79052ad63a20.tar.gz
volse-hubzilla-ac4688eac087854bf8cb0c893d7a79052ad63a20.tar.bz2
volse-hubzilla-ac4688eac087854bf8cb0c893d7a79052ad63a20.zip
allow objs to represent inventory
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php19
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;
+}
+