aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1232.php
blob: d1e3d75b5405820b1723caa889d1b79fa5063ed8 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php

namespace Zotlabs\Update;

class _1232 {

	function run() {
	
		if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
			return UPDATE_SUCCESS;
		}
		else {
			q("START TRANSACTION");

			$r = q("ALTER TABLE channel
				DROP channel_r_stream,
				DROP channel_r_profile,
				DROP channel_r_photos,
				DROP channel_r_abook,
				DROP channel_w_stream,
				DROP channel_w_wall,
				DROP channel_w_tagwall,
				DROP channel_w_comment,
				DROP channel_w_mail,
				DROP channel_w_photos,
				DROP channel_w_chat,
				DROP channel_a_delegate,
				DROP channel_r_storage,
				DROP channel_w_storage,
				DROP channel_r_pages,
				DROP channel_w_pages,
				DROP channel_a_republish,
				DROP channel_w_like"
			);
		}

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

		q("ROLLBACK");
		return UPDATE_FAILED;

	}

}