From 3f474d2941c4ce70822daa00cd0083b9c9690202 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 23 Mar 2019 19:18:15 -0400 Subject: [PATCH] Database Structure version 1305 - Add term_type index to term table --- config/dbstructure.config.php | 3 ++- database.sql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/dbstructure.config.php b/config/dbstructure.config.php index f03132adda..7488787a6a 100644 --- a/config/dbstructure.config.php +++ b/config/dbstructure.config.php @@ -34,7 +34,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1304); + define('DB_UPDATE_VERSION', 1305); } return [ @@ -1195,6 +1195,7 @@ return [ ], "indexes" => [ "PRIMARY" => ["tid"], + "term_type" => ["term", "type"], "oid_otype_type_term" => ["oid", "otype", "type", "term(32)"], "uid_otype_type_term_global_created" => ["uid", "otype", "type", "term(32)", "global", "created"], "uid_otype_type_url" => ["uid", "otype", "type", "url(64)"], diff --git a/database.sql b/database.sql index 10a428ffff..0e7e5a3437 100644 --- a/database.sql +++ b/database.sql @@ -1099,6 +1099,7 @@ CREATE TABLE IF NOT EXISTS `term` ( `global` boolean NOT NULL DEFAULT '0' COMMENT '', `uid` mediumint unsigned NOT NULL DEFAULT 0 COMMENT 'User id', PRIMARY KEY(`tid`), + INDEX `term_type` (`term`, `type`), INDEX `oid_otype_type_term` (`oid`,`otype`,`type`,`term`(32)), INDEX `uid_otype_type_term_global_created` (`uid`,`otype`,`type`,`term`(32),`global`,`created`), INDEX `uid_otype_type_url` (`uid`,`otype`,`type`,`url`(64)), -- 2.39.5