feat: 메인 화면에 정식 기수 표시

This commit is contained in:
2026-08-20 16:22:05 +00:00
parent b3b6be7a16
commit daa96b79aa
10 changed files with 173 additions and 8 deletions
@@ -0,0 +1,18 @@
-- Ref stores server_cnt once at reset time because it is rendered on every main-page load.
-- Backfill the active world's equivalent read-model value while excluding cancelled and
-- unfinished history rows from the official sequence.
UPDATE "world_state" AS ws
SET "meta" = jsonb_set(
COALESCE(ws."meta", '{}'::jsonb),
'{gameIdx}',
to_jsonb((
SELECT COUNT(*)::integer + 1
FROM "ng_games" AS history
WHERE history."status" = 'COMPLETED'
AND (
ws."meta"->>'serverId' IS NULL
OR history."server_id" <> ws."meta"->>'serverId'
)
)),
true
);