]> git.mxchange.org Git - friendica.git/blobdiff - update.php
openid settings appearing when disabled, don't tag numbers, install admin not getting set
[friendica.git] / update.php
index 13187ac5117a9c802aea4bd608181146709f096e..f2cd5573f50ae3f5d647092537638cece127d4a9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define( 'UPDATE_VERSION' , 1067 );
+define( 'UPDATE_VERSION' , 1075 );
 
 /**
  *
@@ -15,7 +15,7 @@ define( 'UPDATE_VERSION' , 1067 );
  * 
  * At the top of the file "boot.php" is a define for DB_UPDATE_VERSION. Any time there is a change
  * to the database schema or one which requires an upgrade path from the existing application,
- * the DB_UPDATE_VERSION is incremented.
+ * the DB_UPDATE_VERSION and the UPDATE_VERSION at the top of this file are incremented.
  *
  * The current DB_UPDATE_VERSION is stored in the config area of the database. If the application starts up
  * and DB_UPDATE_VERSION is greater than the last stored build number, we will process every update function 
@@ -535,4 +535,69 @@ function update_1066() {
                q("ALTER TABLE `item` ADD INDEX ( `received` ) ");
 
        $r = q("UPDATE `item` SET `received` = `edited` WHERE 1");
-}
\ No newline at end of file
+}
+
+function update_1067() {
+       q("ALTER TABLE `ffinder` ADD `type` CHAR( 16 ) NOT NULL AFTER `id` ,
+       ADD `note` TEXT NOT NULL AFTER `type` ");
+}
+
+function update_1068() {
+       // 1067 was short-sighted. Undo it.
+       q("ALTER TABLE `ffinder` DROP `type` , DROP `note` ");
+
+       // and do this instead.
+
+       q("CREATE TABLE IF NOT EXISTS `fsuggest` (
+       `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+       `uid` INT NOT NULL ,
+       `cid` INT NOT NULL ,
+       `name` CHAR( 255 ) NOT NULL ,
+       `url` CHAR( 255 ) NOT NULL ,
+       `photo` CHAR( 255 ) NOT NULL ,
+       `note` TEXT NOT NULL ,
+       `created` DATETIME NOT NULL 
+       ) ENGINE = MYISAM DEFAULT CHARSET=utf8");
+
+}
+
+function update_1069() {
+       q("ALTER TABLE `fsuggest` ADD `request` CHAR( 255 ) NOT NULL AFTER `url` ");
+       q("ALTER TABLE `fcontact` ADD `request` CHAR( 255 ) NOT NULL AFTER `photo` ");
+}
+
+// mail body needs to accomodate private photos
+
+function update_1070() {
+       q("ALTER TABLE `mail` CHANGE `body` `body` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
+}
+
+function update_1071() {
+       q("ALTER TABLE `photo` ADD INDEX ( `uid` ) ");
+       q("ALTER TABLE `photo` ADD INDEX ( `resource-id` ) ");
+       q("ALTER TABLE `photo` ADD INDEX ( `album` ) ");
+       q("ALTER TABLE `photo` ADD INDEX ( `scale` ) ");
+       q("ALTER TABLE `photo` ADD INDEX ( `profile` ) ");
+
+}
+
+function update_1072() {
+       q("ALTER TABLE `item` ADD `starred` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `visible` ");
+       q("ALTER TABLE `item` ADD INDEX ( `starred` ) ");
+}
+
+function update_1073() {
+       q("ALTER TABLE `contact` ADD `remote_self` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `self` ");
+}
+
+function update_1074() {
+       q("ALTER TABLE `user` ADD `hidewall` TINYINT( 1) NOT NULL DEFAULT '0' AFTER `blockwall` ");
+       $r = q("SELECT `uid` FROM `profile` WHERE `is-default` = 1 AND `hidewall` = 1");
+       if(count($r)) {
+               foreach($r as $rr)
+                       q("UPDATE `user` SET `hidewall` = 1 WHERE `uid` = %d LIMIT 1",
+                               intval($rr['uid'])
+                       );
+       }
+       q("ALTER TABLE `profile` DROP `hidewall`");
+}