aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1213.php
blob: d396829a639ec02cb90d094774a53de6c1d90113 (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
24
25
26
27
28
<?php

namespace Zotlabs\Update;

class _1213 {

	function run() {
		if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
			q("START TRANSACTION");

			$r = q("ALTER TABLE abconfig 
				DROP INDEX chan,
				DROP INDEX xchan,
				ADD INDEX chan_xchan (chan, xchan)
			");

			if($r) {
				q("COMMIT");
				return UPDATE_SUCCESS;
			}
			else {        
				q("ROLLBACK");
				return UPDATE_FAILED;
			}
		}
	}

}