feat(ugc): migration gives old cars and rockets a build id

Cars and rockets built before builds were recorded were saved with
subkey 0 and have no ugc_modular_build row, so the client has no
blueprint id to ask for their icon with. The runtime fix only reaches
characters that load again.

Migrations mysql 98 and sqlite 81 (98/81 because the guilds work takes
97/80) run ModularBuildIdMigration after the SQL: every saved item with
modules (x@ma) and no subkey gets what a new build gets, as the
character-load fix does: a persistent id from object_id_tracker (with
the character bit) as its subkey and a ugc_modular_build row with its
modules and the character as owner. The XML is written with
UpdateCharacterXml. Tried on a copy of a server's database with a
couple of thousand such items: every one got an id and a build row, in
seconds.

Check: after the migration, old cars and rockets show their icons in the
backpack (the UGC server makes them like any build) and still work
(equip, race, launch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 06:05:32 -05:00
parent 34ece7f640
commit 7ea0453a6c
9 changed files with 180 additions and 5 deletions

View File

@@ -0,0 +1 @@
/* Gives cars and rockets saved without a subkey a build id: see ModularBuildIdMigration.cpp */

View File

@@ -0,0 +1 @@
/* Gives cars and rockets saved without a subkey a build id: see ModularBuildIdMigration.cpp */