mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-05-06 14:24:15 +02:00
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:
5
server/migrations/sql/0010_fix_zero_rasta_id.sql
Normal file
5
server/migrations/sql/0010_fix_zero_rasta_id.sql
Normal 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;
|
||||
Reference in New Issue
Block a user