]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Merge pull request #788 from annando/master
[friendica.git] / update.php
index b70e7b8ce198d0ad907896a101e7a252fa37e681..40f22e6aa61e9835c3385fa8b0a8e5951d3a24cd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1159 );
+define( 'UPDATE_VERSION' , 1163 );
 
 /**
  *
@@ -1382,8 +1382,6 @@ function update_1157() {
 
        if($r)
                return UPDATE_SUCCESS;
-
-       return UPDATE_FAILED;
 }
 
 function update_1158() {
@@ -1402,3 +1400,44 @@ function update_1158() {
        return UPDATE_FAILED;
 }
 
+function update_1159() {
+       $r = q("ALTER TABLE `term` ADD `aid` int(10) unsigned NOT NULL DEFAULT '0',
+               ADD `uid` int(10) unsigned NOT NULL DEFAULT '0',
+               ADD INDEX (`uid`),
+               ADD INDEX (`aid`)");
+
+       if(!$r)
+               return UPDATE_FAILED;
+
+       return UPDATE_SUCCESS;
+}
+
+function update_1160() {
+       set_config('system', 'maintenance', 1);
+
+       // Wait for 15 seconds for current requests to
+       // clear before locking up the database
+       sleep(15);
+
+       $r = q("ALTER TABLE `item` ADD `mention` TINYINT(1) NOT NULL DEFAULT '0', ADD INDEX (`mention`)");
+       set_config('system', 'maintenance', 0);
+
+       if(!$r)
+               return UPDATE_FAILED;
+
+       return UPDATE_SUCCESS;
+}
+
+function update_1161() {
+       $r = q("ALTER TABLE `pconfig` ADD INDEX (`cat`)");
+
+       if(!$r)
+               return UPDATE_FAILED;
+
+       return UPDATE_SUCCESS;
+}
+
+function update_1162() {
+       require_once('include/tags.php');
+       update_items();
+}