From 4345001212f48d70e0eb09ed328d32375b45444e Mon Sep 17 00:00:00 2001 From: Karrz1 <127596890+Karrz1@users.noreply.github.com> Date: Mon, 23 Nov 2026 23:18:32 +0000 Subject: [PATCH] PlayerbotV2: rpg names migrations as 0063/0064 Bot migrations are numbered in one sequence and 0062 is the last one in use, so 9001/9002 become 0063/0064 (file names, headers and schema_version rows). The conf and the missing-tables warning now point at those migrations instead of a local sql-changes folder. --- ...playerbot_rpg_names.sql => 0063_playerbot_rpg_names.sql} | 6 +++--- ...rpg_names_data.sql => 0064_playerbot_rpg_names_data.sql} | 6 +++--- src/modules/PlayerbotV2/Fleet/BotNamePool.cpp | 6 +++--- src/modules/PlayerbotV2/conf/playerbot.conf.dist | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) rename sql/playerbot_v2/{9001_playerbot_rpg_names.sql => 0063_playerbot_rpg_names.sql} (96%) rename sql/playerbot_v2/{9002_playerbot_rpg_names_data.sql => 0064_playerbot_rpg_names_data.sql} (99%) diff --git a/sql/playerbot_v2/9001_playerbot_rpg_names.sql b/sql/playerbot_v2/0063_playerbot_rpg_names.sql similarity index 96% rename from sql/playerbot_v2/9001_playerbot_rpg_names.sql rename to sql/playerbot_v2/0063_playerbot_rpg_names.sql index 4e37c81b04..5b4da76990 100644 --- a/sql/playerbot_v2/9001_playerbot_rpg_names.sql +++ b/sql/playerbot_v2/0063_playerbot_rpg_names.sql @@ -1,4 +1,4 @@ --- Migration: 9001_playerbot_rpg_names +-- Migration: 0063_playerbot_rpg_names -- Date: 2026-11-23 -- Purpose: Schema for race/sex-appropriate RPG names for V2 bot characters -- (the "RPG names" feature; code in Fleet/BotNamePool.cpp): @@ -64,9 +64,9 @@ CREATE TABLE IF NOT EXISTS {SHARED}.`playerbots_surname_parts` ( KEY `idx_race` (`race`,`half`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; --- Seed data is in 9002_playerbot_rpg_names_data.sql +-- Seed data is in 0064_playerbot_rpg_names_data.sql -- INSERT INTO {SHARED}.playerbot_v2_schema_version (version, sha256) VALUES - (9001, REPEAT('0', 64)) + (63, REPEAT('0', 64)) ON DUPLICATE KEY UPDATE applied_at = CURRENT_TIMESTAMP; diff --git a/sql/playerbot_v2/9002_playerbot_rpg_names_data.sql b/sql/playerbot_v2/0064_playerbot_rpg_names_data.sql similarity index 99% rename from sql/playerbot_v2/9002_playerbot_rpg_names_data.sql rename to sql/playerbot_v2/0064_playerbot_rpg_names_data.sql index 0f32337922..6cec2dcf2a 100644 --- a/sql/playerbot_v2/9002_playerbot_rpg_names_data.sql +++ b/sql/playerbot_v2/0064_playerbot_rpg_names_data.sql @@ -1,6 +1,6 @@ --- Migration: 9002_playerbot_rpg_names_data +-- Migration: 0064_playerbot_rpg_names_data -- Date: 2026-11-23 --- Purpose: Seed data for 9001_playerbot_rpg_names: curated lore first names +-- Purpose: Seed data for 0063_playerbot_rpg_names: curated lore first names -- (995 rows across all 10 races x 2 sexes, incl. Skyborne races 95/96), -- 404 whole surnames and 551 compound surname parts. -- All INSERT IGNORE - safe to re-run. @@ -640,5 +640,5 @@ INSERT IGNORE INTO {SHARED}.`playerbots_surname_parts` (`part`,`half`,`race`) VA ('wright',1,5); INSERT INTO {SHARED}.playerbot_v2_schema_version (version, sha256) VALUES - (9002, REPEAT('0', 64)) + (64, REPEAT('0', 64)) ON DUPLICATE KEY UPDATE applied_at = CURRENT_TIMESTAMP; diff --git a/src/modules/PlayerbotV2/Fleet/BotNamePool.cpp b/src/modules/PlayerbotV2/Fleet/BotNamePool.cpp index 87320b4e9b..d01704a25a 100644 --- a/src/modules/PlayerbotV2/Fleet/BotNamePool.cpp +++ b/src/modules/PlayerbotV2/Fleet/BotNamePool.cpp @@ -125,8 +125,8 @@ char const* NameTable(uint8 pool) } // Which of our tables actually exist in the shared schema. The surname / -// curated tables ship via sql-changes, not a module migration, so a server -// that hasn't applied them yet must not spam a failing SELECT every boot. +// curated tables come from the bot migrations 0063/0064; a server that has +// not run them yet must not spam a failing SELECT every boot. bool g_probed = false; bool g_has_race_names = false; bool g_has_surnames = false; @@ -151,7 +151,7 @@ void ProbeTables() if (!g_has_race_names || !g_has_surnames || !g_has_parts) TC_LOG_WARN("playerbot.v2", "[BotNamePool] RPG-name tables missing in {} (race_names={} surnames={} parts={}) — " - "apply sql-changes/0073_playerbot_rpg_names.sql to enable them.", + "the bot migrations 0063/0064 (sql/playerbot_v2) add them.", SharedDb(), g_has_race_names, g_has_surnames, g_has_parts); } diff --git a/src/modules/PlayerbotV2/conf/playerbot.conf.dist b/src/modules/PlayerbotV2/conf/playerbot.conf.dist index 1817172fae..f995e66fe9 100644 --- a/src/modules/PlayerbotV2/conf/playerbot.conf.dist +++ b/src/modules/PlayerbotV2/conf/playerbot.conf.dist @@ -188,7 +188,7 @@ Playerbot.Population.SpawnCapFactor = 1.10 # "Firstname Surname" (character select, party frames, mail, /who). # Surnames come from {shared}.playerbots_surnames (whole names) and # {shared}.playerbots_surname_parts (combinable halves), both race-keyed; -# apply sql-changes/0073_playerbot_rpg_names.sql to the shared database first. +# filled by the bot migrations 0063/0064 (sql/playerbot_v2), applied at startup. # HR-no Playerbot.Names.Surnames = 1