aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-01 10:00:44 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-01 10:00:44 +0200
commitb4eb9f2a1142cf121dd41ea0ad81475d38343308 (patch)
treefa32a8f59c863564998cd149a902388dd363d605 /install/update.php
parent380f65d309a6ab01d8e804f704962d5baef9820a (diff)
parentc1039977f1d64611d2c793f3aded96d031b74183 (diff)
downloadvolse-hubzilla-b4eb9f2a1142cf121dd41ea0ad81475d38343308.tar.gz
volse-hubzilla-b4eb9f2a1142cf121dd41ea0ad81475d38343308.tar.bz2
volse-hubzilla-b4eb9f2a1142cf121dd41ea0ad81475d38343308.zip
Merge branch 'sabre32' of https://github.com/redmatrix/hubzilla into sabre32
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php58
1 files changed, 56 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php
index 686c199b5..dd0131ee8 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1170 );
+define( 'UPDATE_VERSION' , 1173 );
/**
*
@@ -2131,4 +2131,58 @@ function update_r1169() {
if($r1 && $r2 && $r3)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
-} \ No newline at end of file
+}
+
+
+function update_r1170() {
+
+ $r1 = q("drop table fcontact");
+ $r2 = q("drop table ffinder");
+ $r3 = q("drop table fserver");
+ $r4 = q("drop table fsuggest");
+ $r5 = q("drop table spam");
+
+ if($r1 && $r2 && $r3 && $r4 && $r5)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}
+
+function update_r1171() {
+
+ $r1 = q("ALTER TABLE verify CHANGE `type` `vtype` varchar(32) NOT NULL DEFAULT '' ");
+ $r2 = q("ALTER TABLE tokens CHANGE `scope` `auth_scope` varchar(512) NOT NULL DEFAULT '' ");
+ $r3 = q("ALTER TABLE auth_codes CHANGE `scope` `auth_scope` varchar(512) NOT NULL DEFAULT '' ");
+ $r4 = q("ALTER TABLE clients CHANGE `name` `clname` TEXT ");
+ $r5 = q("ALTER TABLE session CHANGE `data` `sess_data` TEXT NOT NULL ");
+ $r6 = q("ALTER TABLE register CHANGE `language` `lang` varchar(16) NOT NULL DEFAULT '' ");
+
+ if($r1 && $r2 && $r3 && $r4 && $r5 && $r6)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+
+
+}
+
+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;
+
+}