aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-01 22:36:33 -0700
committerFriendika <info@friendika.com>2011-07-01 22:36:33 -0700
commitfb0e758ce79c5c6a70d41766e3581bf756881d03 (patch)
treed41d5b2f75546f7fc3e7154a188b5909ed8eac5e
parentccb00d68827b1ec7ebc4e9c436e4f70354d1c9c4 (diff)
downloadvolse-hubzilla-fb0e758ce79c5c6a70d41766e3581bf756881d03.tar.gz
volse-hubzilla-fb0e758ce79c5c6a70d41766e3581bf756881d03.tar.bz2
volse-hubzilla-fb0e758ce79c5c6a70d41766e3581bf756881d03.zip
add some indexes to photos
-rw-r--r--boot.php2
-rw-r--r--database.sql7
-rw-r--r--update.php10
3 files changed, 16 insertions, 3 deletions
diff --git a/boot.php b/boot.php
index b9b8871d4..1807ff1c4 100644
--- a/boot.php
+++ b/boot.php
@@ -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' );
diff --git a/database.sql b/database.sql
index 5187f3c3e..c9f9ae77a 100644
--- a/database.sql
+++ b/database.sql
@@ -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;
-- --------------------------------------------------------
diff --git a/update.php b/update.php
index 187662901..775bf7b92 100644
--- a/update.php
+++ b/update.php
@@ -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` ) ");
+
+}