aboutsummaryrefslogtreecommitdiffstats
path: root/update.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-05 21:43:38 -0700
committerfriendica <info@friendica.com>2012-04-05 21:43:38 -0700
commit4bee1859be5fbf46ecc19728a908e31b4e9b09b6 (patch)
tree8b0e987e0fc2359fb5b06dba2caace51dfb889ae /update.php
parent6bc7e6e09f2f21c5e75be3ef4dc70a6e84a7df09 (diff)
parent355c42cb309eb1313097411067ca999b699aa620 (diff)
downloadvolse-hubzilla-4bee1859be5fbf46ecc19728a908e31b4e9b09b6.tar.gz
volse-hubzilla-4bee1859be5fbf46ecc19728a908e31b4e9b09b6.tar.bz2
volse-hubzilla-4bee1859be5fbf46ecc19728a908e31b4e9b09b6.zip
Merge branch 'pull'
Diffstat (limited to 'update.php')
-rw-r--r--[-rwxr-xr-x]update.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/update.php b/update.php
index d38e39f8b..ae35d2d50 100755..100644
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1134 );
+define( 'UPDATE_VERSION' , 1135 );
/**
*
@@ -1137,7 +1137,22 @@ INDEX ( `username` )
}
function update_1133() {
- q("ALTER TABLE `user` ADD `unkmail` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `blocktags` , ADD INDEX ( `unkmail` ) ");
- q("ALTER TABLE `user` ADD `cntunkmail` INT NOT NULL DEFAULT '10' AFTER `unkmail` , ADD INDEX ( `cntunkmail` ) ");
- q("ALTER TABLE `mail` ADD `unknown` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `replied` , ADD INDEX ( `unknown` ) ");
+q("ALTER TABLE `user` ADD `unkmail` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `blocktags` , ADD INDEX ( `unkmail` ) ");
+q("ALTER TABLE `user` ADD `cntunkmail` INT NOT NULL DEFAULT '10' AFTER `unkmail` , ADD INDEX ( `cntunkmail` ) ");
+q("ALTER TABLE `mail` ADD `unknown` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `replied` , ADD INDEX ( `unknown` ) ");
+}
+
+function update_1134() {
+ //there can't be indexes with more than 1000 bytes in mysql,
+ //so change charset to be smaller
+ q("ALTER TABLE `config` CHANGE `cat` `cat` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL ,
+CHANGE `k` `k` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL");
+ //and add the index
+ q("ALTER TABLE `friendica`.`config` ADD UNIQUE `access` ( `cat` , `k` ) ");
+
+ //same thing for pconfig
+ q("ALTER TABLE `pconfig` CHANGE `cat` `cat` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL ,
+ CHANGE `k` `k` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL");
+
+ q("ALTER TABLE `friendica`.`pconfig` ADD UNIQUE `access` ( `uid` , `cat` , `k` )");
}