fix: create user_binary row on character creation (#176)

New characters were missing their user_binary record, preventing them
from entering their house. Both sign server and API character creation
paths now insert the row. A backfill migration fixes existing databases.
This commit is contained in:
Houmgaor
2026-03-16 17:11:55 +01:00
parent 1ae7dffe7b
commit 5009a37d19
3 changed files with 19 additions and 3 deletions

View File

@@ -42,6 +42,10 @@ func (r *APICharacterRepository) Create(ctx context.Context, userID uint32, last
RETURNING id, name, is_female, weapon_type, hr, gr, last_login`,
userID, lastLogin,
)
if err != nil {
return character, err
}
_, err = r.db.ExecContext(ctx, `INSERT INTO user_binary (id) VALUES ($1)`, character.ID)
return character, err
}