blob: 117e87fa11495f8d400e76ea7ec99beda39c8a2c (
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 _1172 {
function run() {
$r1 = q("ALTER TABLE term CHANGE `type` `ttype` int(3) NOT NULL DEFAULT '0' ");
if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
$r2 = q("ALTER TABLE groups CHANGE `name` `gname` TEXT NOT NULL ");
$r3 = q("ALTER TABLE profile CHANGE `name` `fullname` TEXT NOT NULL ");
$r4 = q("ALTER TABLE profile CHANGE `with` `partner` TEXT NOT NULL ");
$r5 = q("ALTER TABLE profile CHANGE `work` `employment` TEXT NOT NULL ");
}
else {
$r2 = q("ALTER TABLE groups CHANGE `name` `gname` char(255) NOT NULL DEFAULT '' ");
$r3 = q("ALTER TABLE profile CHANGE `name` `fullname` char(255) NOT NULL DEFAULT '' ");
$r4 = q("ALTER TABLE profile CHANGE `with` `partner` char(255) NOT NULL DEFAULT '' ");
$r5 = q("ALTER TABLE profile CHANGE `work` `employment` TEXT NOT NULL ");
}
if($r1 && $r2 && $r3 && $r4 && $r5)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
}
}
|