1
1
Fork 0

add some indexes to photos

This commit is contained in:
Friendika 2011-07-01 22:36:33 -07:00
parent ccb00d6882
commit fb0e758ce7
3 changed files with 16 additions and 3 deletions

View file

@ -6,7 +6,7 @@ ini_set('pcre.backtrack_limit', 250000);
define ( 'FRIENDIKA_VERSION', '2.2.1028' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1071 );
define ( 'DB_UPDATE_VERSION', 1072 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View file

@ -278,7 +278,12 @@ CREATE TABLE IF NOT EXISTS `photo` (
`allow_gid` mediumtext NOT NULL,
`deny_cid` mediumtext NOT NULL,
`deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `resource-id` (`resource-id`),
KEY `album` (`album`),
KEY `scale` (`scale`),
KEY `profile` (`profile`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1071 );
define( 'UPDATE_VERSION' , 1072 );
/**
*
@ -572,3 +572,11 @@ function update_1070() {
q("ALTER TABLE `mail` CHANGE `body` `body` MEDIUMTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
}
function update_1071() {
q("ALTER TABLE `photo` ADD INDEX ( `uid` ) ");
q("ALTER TABLE `photo` ADD INDEX ( `resource-id` ) ");
q("ALTER TABLE `photo` ADD INDEX ( `album` ) ");
q("ALTER TABLE `photo` ADD INDEX ( `scale` ) ");
q("ALTER TABLE `photo` ADD INDEX ( `profile` ) ");
}