diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-04-06 03:54:09 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-04-06 03:54:09 -0400 |
commit | 43d5876e8b35d53a0bef5248c5d63e5bc209dbbf (patch) | |
tree | 2f9d83d87682b16ac6ac949382ab566fdca48076 /update.php | |
parent | b361bcea83140c28b5a5677905405de0ac102791 (diff) | |
parent | afd2bf031eff688ae53e51f9199d025ca1935abe (diff) | |
download | volse-hubzilla-43d5876e8b35d53a0bef5248c5d63e5bc209dbbf.tar.gz volse-hubzilla-43d5876e8b35d53a0bef5248c5d63e5bc209dbbf.tar.bz2 volse-hubzilla-43d5876e8b35d53a0bef5248c5d63e5bc209dbbf.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
update to the German strings
add network_tabs hook
pass autoname(0) test
rev update
added index to config and pconfig table changed config.php to use REPLACE instead of INSERT, this removes one db hit.
* master:
Diffstat (limited to 'update.php')
-rw-r--r--[-rwxr-xr-x] | update.php | 23 |
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` )"); } |