aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php
index 4883d6561..dd0131ee8 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1172 );
+define( 'UPDATE_VERSION' , 1173 );
/**
*
@@ -2163,4 +2163,26 @@ function update_r1171() {
-} \ No newline at end of file
+}
+
+function update_r1172() {
+
+ $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;
+
+}