mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-05-07 06:44:31 +02:00
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.
6 lines
355 B
SQL
6 lines
355 B
SQL
-- 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;
|