19 lines
1.0 KiB
SQL
19 lines
1.0 KiB
SQL
-- One-shot: run in Supabase Dashboard → SQL Editor **before** the updated
|
|
-- schemas/rpc_settle_match_reward.sql.
|
|
-- Audit columns for hidden MMR: dedicated-server scores/forfeit and the applied delta.
|
|
|
|
alter table public.matches
|
|
add column if not exists red_score smallint null,
|
|
add column if not exists blue_score smallint null,
|
|
add column if not exists forfeit boolean null,
|
|
add column if not exists mmr_delta integer null;
|
|
|
|
comment on column public.matches.red_score is
|
|
'Rounds/sets for red at settle (dedicated server). Null if omitted (legacy).';
|
|
comment on column public.matches.blue_score is
|
|
'Rounds/sets for blue at settle (dedicated server). Null if omitted (legacy).';
|
|
comment on column public.matches.forfeit is
|
|
'True when the match ended by forfeit (leave, disconnect, last-disconnect, or skip/auto-forfeit). Leave/disconnect uses 20% MMR; skip-forfeit with both connected uses the score table.';
|
|
comment on column public.matches.mmr_delta is
|
|
'Hidden MMR the winner gained (loser lost, floored at 0). Null on matches settled before MMR.';
|