diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index 05984036e..58d8026a4 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -7136,6 +7136,31 @@ ADD COLUMN `entity_variables` TEXT DEFAULT NULL AFTER `rezzable`; )", .content_schema_update = false }, + ManifestEntry{ + .version = 9326, + .description = "2025_07_27_add_indexes_npc_spawns_loot.sql", + .check = "SHOW INDEX FROM npc_types", + .condition = "missing", + .match = "idx_npc_types_loottable_id", + .sql = R"( +ALTER TABLE npc_types + ADD INDEX idx_npc_types_loottable_id (loottable_id); + +ALTER TABLE spawnentry + ADD INDEX idx_spawnentry_spawngroup_id (spawngroupID), + ADD INDEX idx_spawnentry_npc_id (npcID); + +ALTER TABLE lootdrop_entries + ADD INDEX idx_lootdrop_entries_lootdrop_id (lootdrop_id), + ADD INDEX idx_lootdrop_entries_item_id (item_id); + +ALTER TABLE loottable_entries + ADD INDEX idx_loottable_entries_lootdrop_id (lootdrop_id), + ADD INDEX idx_loottable_entries_loottable_id (loottable_id); +)", + .content_schema_update = true + }, + // -- template; copy/paste this when you need to create a new entry // ManifestEntry{ // .version = 9228, diff --git a/common/version.h b/common/version.h index 82382af86..0fb38f1af 100644 --- a/common/version.h +++ b/common/version.h @@ -42,7 +42,7 @@ * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9325 +#define CURRENT_BINARY_DATABASE_VERSION 9326 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9054 #define CUSTOM_BINARY_DATABASE_VERSION 0