fix bad sql update
This commit is contained in:
parent
91906b1b74
commit
0731c177eb
2 changed files with 10 additions and 5 deletions
2
boot.php
2
boot.php
|
@ -11,7 +11,7 @@ require_once('include/cache.php');
|
|||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||
define ( 'FRIENDICA_VERSION', '2.3.1303' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1135 );
|
||||
define ( 'DB_UPDATE_VERSION', 1136 );
|
||||
|
||||
define ( 'EOL', "<br />\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
|
13
update.php
13
update.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1135 );
|
||||
define( 'UPDATE_VERSION' , 1136 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1143,16 +1143,21 @@ q("ALTER TABLE `mail` ADD `unknown` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `rep
|
|||
}
|
||||
|
||||
function update_1134() {
|
||||
// faulty update merged forward
|
||||
// had a hardwired tablename of 'friendica' which isn't the right name on most systems
|
||||
}
|
||||
|
||||
function update_1135() {
|
||||
//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` ) ");
|
||||
q("ALTER TABLE `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` )");
|
||||
}
|
||||
q("ALTER TABLE `pconfig` ADD UNIQUE `access` ( `uid` , `cat` , `k` )");
|
||||
}
|
Loading…
Reference in a new issue