aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/schema_mysql.sql4
-rw-r--r--install/update.php14
2 files changed, 15 insertions, 3 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index c011cc157..ea13e0de6 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -644,7 +644,6 @@ CREATE TABLE IF NOT EXISTS `item` (
`item_pending_remove` tinyint(1) NOT NULL DEFAULT 0 ,
`item_blocked` tinyint(1) NOT NULL DEFAULT 0 ,
PRIMARY KEY (`id`),
- KEY `uid` (`uid`),
KEY `parent` (`parent`),
KEY `created` (`created`),
KEY `edited` (`edited`),
@@ -690,7 +689,8 @@ CREATE TABLE IF NOT EXISTS `item` (
KEY `item_verified` (`item_verified`),
KEY `item_retained` (`item_retained`),
KEY `item_rss` (`item_rss`),
- KEY `item_consensus` (`item_consensus`)
+ KEY `item_consensus` (`item_consensus`),
+ KEY `item_type` (`item_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `item_id` (
diff --git a/install/update.php b/install/update.php
index 1bb39fc65..ceaccdfa3 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1199 );
+define( 'UPDATE_VERSION' , 1200 );
/**
*
@@ -3087,3 +3087,15 @@ function update_r1198() {
return UPDATE_SUCCESS;
}
+
+function update_r1199() {
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ $r = q("ALTER TABLE item
+ DROP INDEX uid,
+ ADD INDEX (item_type)
+ ");
+ }
+
+ return UPDATE_SUCCESS;
+}