New field "network" in item table to speed up the system.

This commit is contained in:
Michael Vogel 2013-10-25 23:33:53 +02:00
parent 5b6e16d193
commit 0ffeb4cf92
5 changed files with 20 additions and 7 deletions

View File

@ -14,7 +14,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.2.1744' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1163 );
define ( 'DB_UPDATE_VERSION', 1164 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -562,6 +562,7 @@ CREATE TABLE IF NOT EXISTS `item` (
`forum_mode` tinyint(1) NOT NULL DEFAULT '0',
`mention` tinyint(1) NOT NULL DEFAULT '0',
`last-child` tinyint(1) unsigned NOT NULL DEFAULT '1',
`network` char(32) NOT NULL,
PRIMARY KEY (`id`),
KEY `uri` (`uri`),
KEY `uid` (`uid`),
@ -593,6 +594,7 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `mention` (`mention`),
KEY `resource-id` (`resource-id`),
KEY `event_id` (`event-id`),
KEY `network` (`network`),
FULLTEXT KEY `title` (`title`),
FULLTEXT KEY `body` (`body`),
FULLTEXT KEY `allow_cid` (`allow_cid`),

View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1163 );
define( 'UPDATE_VERSION' , 1164 );
/**
*
@ -1441,3 +1441,17 @@ function update_1162() {
require_once('include/tags.php');
update_items();
}
function update_1163() {
set_config('system', 'maintenance', 1);
$r = q("ALTER TABLE `item` ADD `network` char(32) NOT NULL,
ADD INDEX (`network`)");
set_config('system', 'maintenance', 0);
if(!$r)
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}

View File

@ -292,14 +292,11 @@ body {
font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
background-color: #ffffff;
/* background-color: #ddd; */
/* background-color: #F2F2F2; */
color: #2d2d2d;
/* margin: 37px 0px 0px 0px; */
margin: 0px 0px 0px 0px;
display: table;
/* width: 100% */
}
h4 {
font-size: 1.1em;
}