-- `users.rc` as type `real` is IEEE float32: above ~1e7, consecutive values are spaced -- by more than 1 (and by hundreds at ~4e9), so debits like -20 do not change the stored value. -- Run this in Supabase SQL before relying on `purchase_rc` or large RC balances. -- -- After this, re-apply public.purchase_rc from schemas/rpc_purchase_rc.sql (no ::real casts). alter table public.users alter column rc type bigint using round(coalesce(rc, 0))::bigint;