mirror of
https://github.com/friendica/friendica
synced 2024-10-07 05:21:55 +02:00
fix item_id table
This commit is contained in:
parent
59d98647fb
commit
640f5306f5
2
boot.php
2
boot.php
|
@ -13,7 +13,7 @@ require_once('library/Mobile_Detect/Mobile_Detect.php');
|
|||
define ( 'FRIENDICA_PLATFORM', 'Friendica');
|
||||
define ( 'FRIENDICA_VERSION', '3.0.1468' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'DB_UPDATE_VERSION', 1155 );
|
||||
define ( 'DB_UPDATE_VERSION', 1156 );
|
||||
|
||||
define ( 'EOL', "<br />\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
|
|
@ -592,11 +592,13 @@ CREATE TABLE IF NOT EXISTS `item` (
|
|||
--
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `item_id` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`iid` int(11) NOT NULL,
|
||||
`uid` int(11) NOT NULL,
|
||||
`sid` char(255) NOT NULL,
|
||||
`service` char(255) NOT NULL,
|
||||
PRIMARY KEY (`iid`),
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `iid` (`iid`),
|
||||
KEY `uid` (`uid`),
|
||||
KEY `sid` (`sid`),
|
||||
KEY `service` (`service`)
|
||||
|
|
13
update.php
13
update.php
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1155 );
|
||||
define( 'UPDATE_VERSION' , 1156 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -1351,3 +1351,14 @@ function update_1154() {
|
|||
return UPDATE_SUCCESS;
|
||||
}
|
||||
|
||||
function update_1155() {
|
||||
$r1 = q("ALTER TABLE `item_id` DROP PRIMARY KEY");
|
||||
$r2 = q("ALTER TABLE `item_id` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
|
||||
$r3 = q("ALTER TABLE `item_id` ADD INDEX ( `iid` ) ");
|
||||
|
||||
if($r1 && $r2 && $r3)
|
||||
return UPDATE_SUCCESS;
|
||||
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue