From f7c6c6d5af8f20d97695ac89396c61be5b661a63 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 16 Feb 2025 20:30:42 -0600 Subject: [PATCH] Update database_update_manifest.cpp --- common/database/database_update_manifest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/database/database_update_manifest.cpp b/common/database/database_update_manifest.cpp index eaae24462..9eafdaaf6 100644 --- a/common/database/database_update_manifest.cpp +++ b/common/database/database_update_manifest.cpp @@ -6852,9 +6852,6 @@ DROP INDEX IF EXISTS `idx_npc_expires` ON `data_buckets`; DROP INDEX IF EXISTS `idx_bot_expires` ON `data_buckets`; DROP INDEX IF EXISTS `idx_account_id_key` ON `data_buckets`; --- ✅ 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); - -- Add zone_id, instance_id ALTER TABLE `data_buckets` MODIFY COLUMN `npc_id` int(11) NOT NULL DEFAULT 0 AFTER `character_id`, @@ -6867,6 +6864,9 @@ ALTER TABLE `data_buckets` MODIFY COLUMN `character_id` bigint(11) UNSIGNED NOT NULL DEFAULT 0 AFTER `account_id`, 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 UNIQUE INDEX `keys` ON data_buckets (`key`, character_id, npc_id, bot_id, account_id, zone_id, instance_id); )", .content_schema_update = false },