fix(migrations): heal rasta_id=0 rows (#163)

The pre-106cf85 SaveMercenary bug could overwrite a character's NULL
rasta_id with 0, a value not drawn from rasta_id_seq that causes silent
save failures. The code fix prevents new occurrences but leaves already
affected rows stuck. Migration 0010 sets rasta_id=NULL where it is 0 so
existing users auto-heal on upgrade.
This commit is contained in:
Houmgaor
2026-04-06 17:10:33 +02:00
parent 49a5069e3d
commit 05ea321d9e
2 changed files with 6 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
-- Heal characters whose rasta_id was clobbered to 0 by the pre-106cf85
-- SaveMercenary bug. A rasta_id of 0 is not a valid sequence value and
-- causes silent save failures on affected characters (see #163).
-- The normal default for characters that never registered a mercenary is NULL.
UPDATE public.characters SET rasta_id = NULL WHERE rasta_id = 0;