aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1245.php
blob: 8212fde08ef3898471cdb73a70741a722090806c (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
29
<?php

namespace Zotlabs\Update;

class _1245 {

	function run() {

		if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
				return UPDATE_SUCCESS;
		}

		if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
			q("START TRANSACTION");

			$r = dbq("create index hubloc_hash on hubloc (hubloc_hash)");

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

			q("ROLLBACK");
			return UPDATE_FAILED;
		}

	}

}