14 lines
764 B
SQL
14 lines
764 B
SQL
-- One-shot: run in Supabase Dashboard → SQL Editor **before** the updated
|
|
-- schemas/rpc_settle_match_reward.sql.
|
|
-- Records which sides received participant_cc on settle so winner PATCH retries
|
|
-- can return the same cc_awarded_* flags without crediting CC twice.
|
|
|
|
alter table public.matches
|
|
add column if not exists cc_awarded_red boolean null,
|
|
add column if not exists cc_awarded_blue boolean null;
|
|
|
|
comment on column public.matches.cc_awarded_red is
|
|
'Whether user_red received participant_cc on settle; null on matches settled before this column existed (treat as true).';
|
|
comment on column public.matches.cc_awarded_blue is
|
|
'Whether user_blue received participant_cc on settle; null on matches settled before this column existed (treat as true).';
|