Files
Erupe/server/migrations/sql/0006_backfill_user_binary.sql
Houmgaor 5009a37d19 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.
2026-03-16 17:11:55 +01:00

7 lines
260 B
SQL

-- Backfill user_binary rows for characters that were created without one.
-- This fixes #176: new characters could not enter their house.
INSERT INTO user_binary (id)
SELECT c.id FROM characters c
LEFT JOIN user_binary ub ON ub.id = c.id
WHERE ub.id IS NULL;