DB: Add index to quest_tracker

Closes #31241

(cherry picked from commit f9a6d91289)
This commit is contained in:
Shauren
2025-09-09 14:07:09 +02:00
parent 60ef8a085d
commit 1113338d79
2 changed files with 6 additions and 2 deletions

View File

@@ -3547,7 +3547,7 @@ CREATE TABLE `quest_tracker` (
`completed_by_gm` tinyint(1) NOT NULL DEFAULT '0',
`core_hash` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
`core_revision` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
PRIMARY KEY (`id`,`character_guid`)
UNIQUE KEY `idx_latest_quest_for_character` (`id`,`character_guid`,`quest_accept_time` DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -3823,7 +3823,8 @@ INSERT INTO `updates` VALUES
('2025_07_21_00_characters.sql','056A99B9AA90186E5B3177BF54C86607B6518BE9','ARCHIVED','2025-07-21 22:51:05',0),
('2025_08_13_00_characters.sql','0A559553A1DD9FC973AB01C3B1A9284B07CFBB36','ARCHIVED','2025-08-12 20:17:45',0),
('2025_08_16_00_characters.sql','8DF6284B6C7BEDAB599F7E4802FF8BCD80613A92','ARCHIVED','2025-08-16 14:58:22',0),
('2025_08_19_00_characters.sql','EC197D88883CDA2B885675FE096DD56CCB143608','RELEASED','2025-08-19 01:03:26',0);
('2025_08_19_00_characters.sql','EC197D88883CDA2B885675FE096DD56CCB143608','RELEASED','2025-08-19 01:03:26',0),
('2025_09_09_00_characters.sql','CF3F0738623248620204175B049AAF0833262222','RELEASED','2025-09-09 14:11:21',0);
/*!40000 ALTER TABLE `updates` ENABLE KEYS */;
UNLOCK TABLES;

View File

@@ -0,0 +1,3 @@
ALTER TABLE `quest_tracker`
DROP PRIMARY KEY,
ADD UNIQUE INDEX `idx_latest_quest_for_character`(`id`, `character_guid`, `quest_accept_time` DESC);