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' );
--
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`)
<?php
-define( 'UPDATE_VERSION' , 1155 );
+define( 'UPDATE_VERSION' , 1156 );
/**
*
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;
+}
+