mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Adv 2.0 L4f-prep: DisplayName migration scaffold (schema + dual-write + helper)
Adds player_meta.display_name with idempotent backfill, dual-writes from createAdvCharacter (in-tx) and saveAdvCharacter (post-commit), and a loadDisplayName helper with AdvCharacter fallback. Readers are not flipped yet — soak begins now; per-call-site swap follows in a later session. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -186,6 +186,10 @@ func runMigrations(d *sql.DB) error {
|
||||
// !zone enter sessions that aren't tied to an expedition. Expedition
|
||||
// runs continue to use expedition.region_state for the same data.
|
||||
`ALTER TABLE dnd_zone_run ADD COLUMN harvest_nodes_json TEXT NOT NULL DEFAULT '{}'`,
|
||||
// Adv 2.0 Phase L4f-prep — DisplayName migration off AdvCharacter.
|
||||
// player_meta gets the canonical column; AdvCharacter.display_name
|
||||
// keeps dual-writing during soak (gogobee_legacy_migration.md §7).
|
||||
`ALTER TABLE player_meta ADD COLUMN display_name TEXT NOT NULL DEFAULT ''`,
|
||||
}
|
||||
for _, stmt := range columnMigrations {
|
||||
if _, err := d.Exec(stmt); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user