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

This commit is contained in:
Hide_D committed 2026-08-20 16:22:05 +00:00
1 parent b3b6be7a16
commit daa96b79aa
10 files changed
+173 -8

No files matched your search

@@ -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
);