diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e52315ce..8523de360 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [23.3.1] 3/11/2025 +## [23.3.2] 3/11/2025 ### DynamicZones diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index 8c3abaa55..c882cdb96 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -6845,7 +6845,7 @@ RENAME TABLE `expedition_lockouts` TO `dynamic_zone_lockouts`; .condition = "empty", .match = "", .sql = R"( --- ✅ Drop old indexes +-- Drop old indexes if exists DROP INDEX IF EXISTS `keys` ON `data_buckets`; DROP INDEX IF EXISTS `idx_npc_expires` ON `data_buckets`; DROP INDEX IF EXISTS `idx_bot_expires` ON `data_buckets`; @@ -6863,10 +6863,10 @@ ALTER TABLE `data_buckets` MODIFY COLUMN `npc_id` int(11) UNSIGNED NOT NULL DEFAULT 0 AFTER `character_id`, MODIFY COLUMN `bot_id` int(11) UNSIGNED NOT NULL DEFAULT 0 AFTER `npc_id`; --- ✅ Create optimized unique index with `key` first +-- Create optimized unique index with `key` first CREATE UNIQUE INDEX `keys` ON data_buckets (`key`, character_id, npc_id, bot_id, account_id, zone_id, instance_id); --- ✅ Create indexes for just instance_id (instance deletion) +-- Create indexes for just instance_id (instance deletion) CREATE INDEX idx_instance_id ON data_buckets (instance_id); )", .content_schema_update = false @@ -6962,6 +6962,34 @@ ALTER TABLE `zone_state_spawns` )", .content_schema_update = false }, + ManifestEntry{ + .version = 9312, + .description = "2025_03_11_data_bucket_indexes.sql", + .check = "SHOW INDEX FROM data_buckets", + .condition = "missing", + .match = "idx_zone_instance_expires", + .sql = R"( +DROP INDEX IF EXISTS `idx_zone_instance_expires` ON `data_buckets`; +DROP INDEX IF EXISTS `idx_character_expires` ON `data_buckets`; +DROP INDEX IF EXISTS `idx_bot_expires` ON `data_buckets`; +ALTER TABLE data_buckets ADD INDEX idx_zone_instance_expires (zone_id, instance_id, expires); +ALTER TABLE data_buckets ADD INDEX idx_character_expires (character_id, expires); +ALTER TABLE data_buckets ADD INDEX idx_bot_expires (bot_id, expires); +)", + .content_schema_update = false + }, + ManifestEntry{ + .version = 9313, + .description = "2025_03_11_data_bucket_indexes.sql", + .check = "SHOW INDEX FROM zone_state_spawns", + .condition = "missing", + .match = "idx_zone_instance", + .sql = R"( +ALTER TABLE zone_state_spawns ADD INDEX idx_zone_instance (zone_id, instance_id); +ALTER TABLE zone_state_spawns ADD INDEX idx_instance_id (instance_id); +)", + .content_schema_update = false + }, // -- 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 136d96583..14b18d5a4 100644 --- a/common/version.h +++ b/common/version.h @@ -25,7 +25,7 @@ // Build variables // these get injected during the build pipeline -#define CURRENT_VERSION "23.3.1-dev" // always append -dev to the current version for custom-builds +#define CURRENT_VERSION "23.3.2-dev" // always append -dev to the current version for custom-builds #define LOGIN_VERSION "0.8.0" #define COMPILE_DATE __DATE__ #define COMPILE_TIME __TIME__ @@ -42,7 +42,7 @@ * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt */ -#define CURRENT_BINARY_DATABASE_VERSION 9311 +#define CURRENT_BINARY_DATABASE_VERSION 9313 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9054 #endif diff --git a/package.json b/package.json index 45115e553..42eead762 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eqemu-server", - "version": "23.3.1", + "version": "23.3.2", "repository": { "type": "git", "url": "https://github.com/EQEmu/Server.git"