define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.1.1601' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
-define ( 'DB_UPDATE_VERSION', 1158 );
+define ( 'DB_UPDATE_VERSION', 1159 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
KEY `uid_commented` (`uid`, `commented`),
KEY `uid_created` (`uid`, `created`),
KEY `uid_unseen` (`uid`, `unseen`),
+ KEY `event_id` (`event-id`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
FULLTEXT KEY `allow_cid` (`allow_cid`),
<?php
-define( 'UPDATE_VERSION' , 1158 );
+define( 'UPDATE_VERSION' , 1159 );
/**
*
return UPDATE_FAILED;
}
+function update_1158() {
+ set_config('system', 'maintenance', 1);
+
+ // Wait for 15 seconds for current requests to
+ // clear before locking up the database
+ sleep(15);
+
+ $r = q("CREATE INDEX event_id ON item(`event-id`)");
+ set_config('system', 'maintenance', 0);
+
+ if($r)
+ return UPDATE_SUCCESS;
+
+ return UPDATE_FAILED;
+}
+