aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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` ) ");
+
+}