From c5e746ae7976ce407dde571ec5f2c2ad2fc1915f Mon Sep 17 00:00:00 2001 From: jsn Date: Sun, 1 Dec 2024 20:08:31 +0800 Subject: [PATCH] Indexed storage_id column from storage sql table --- sql-files/main.sql | 3 ++- sql-files/upgrades/2024-11-03--07-00.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sql-files/main.sql b/sql-files/main.sql index e2a9b65551d..a17ad0fd258 100644 --- a/sql-files/main.sql +++ b/sql-files/main.sql @@ -1002,7 +1002,8 @@ CREATE TABLE IF NOT EXISTS `storage` ( `bound` TINYINT UNSIGNED NOT NULL DEFAULT '0', `unique_id` BIGINT UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - KEY `account_id` (`account_id`) + KEY `account_id` (`account_id`), + KEY `storage_id` (`storage_id`) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS `rodex_items` ( diff --git a/sql-files/upgrades/2024-11-03--07-00.sql b/sql-files/upgrades/2024-11-03--07-00.sql index 1e1438e1dc3..9d3f36da610 100644 --- a/sql-files/upgrades/2024-11-03--07-00.sql +++ b/sql-files/upgrades/2024-11-03--07-00.sql @@ -18,6 +18,7 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -ALTER TABLE `storage` ADD `storage_id` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `account_id`; +ALTER TABLE `storage` ADD `storage_id` INT UNSIGNED NOT NULL DEFAULT '1' AFTER `account_id`, +ADD INDEX `storage_id` (`storage_id`); INSERT INTO `sql_updates` (`timestamp`) VALUES (1730631632);