Symptom
Regiments layer badges show 0/1 for every regiment; FMG's own overview shows totals like 1886/1875. Digia: all 81 regiments have total_men in {0,1}.
Root cause
server/services/maps/fmg-full-json/ingesters/regiments.js (insert params, line ~26):
r.n ?? null, r.a ?? null, // → (total_men, attack_value)
In FMG's military schema n is the naval flag (0/1) and a is the army total. So total_men gets the flag and attack_value gets the real total.
Fix
- Ingester:
total_men = r.a; attack_value has no FMG source — write NULL (or drop the column).
- Backfill for already-imported worlds:
UPDATE maps_regiments SET total_men = attack_value::integer, attack_value = NULL
WHERE attack_value IS NOT NULL;
components/layers/regiments.ts reads total_men for its badge — no frontend change needed once data is right.
Found browser-testing lazy-world-tiles 2026-08-10 (world Digia); pre-existing Plan B ingest bug, unrelated to that branch.
Symptom
Regiments layer badges show 0/1 for every regiment; FMG's own overview shows totals like 1886/1875. Digia: all 81 regiments have total_men in {0,1}.
Root cause
server/services/maps/fmg-full-json/ingesters/regiments.js(insert params, line ~26):In FMG's military schema
nis the naval flag (0/1) andais the army total. So total_men gets the flag and attack_value gets the real total.Fix
total_men = r.a;attack_valuehas no FMG source — write NULL (or drop the column).components/layers/regiments.tsreadstotal_menfor its badge — no frontend change needed once data is right.Found browser-testing lazy-world-tiles 2026-08-10 (world Digia); pre-existing Plan B ingest bug, unrelated to that branch.