aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1168.php
blob: cf7d2689afa366f511e3d3f1e89efed1f4a779cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}


}