diff options
Diffstat (limited to 'Zotlabs/Update/_1168.php')
-rw-r--r-- | Zotlabs/Update/_1168.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1168.php b/Zotlabs/Update/_1168.php new file mode 100644 index 000000000..cf7d2689a --- /dev/null +++ b/Zotlabs/Update/_1168.php @@ -0,0 +1,23 @@ +<?php + +namespace Zotlabs\Update; + +class _1168 { +function run() { + + $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; +} + + +}
\ No newline at end of file |