aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1227.php
blob: b5dbb22867dd2b227ed41cb8113035eb03bb80a1 (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
30
<?php

namespace Zotlabs\Update;


class _1227 {

	function run() {

		q("START TRANSACTION");

		if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
			$r = q("ALTER TABLE dreport ADD dreport_name text NOT NULL DEFAULT '' ");
		}
		else {
			$r = q("ALTER TABLE `dreport` ADD `dreport_name` char(191) NOT NULL DEFAULT ''"); 
		}

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

		q("ROLLBACK");
		return UPDATE_FAILED;
	}

}