AUTO OPS /demo

-- supabase · table demo_codes
code text primary key · client text
expires_at timestamptz · used_at timestamptz null
-- rpc consume_demo_code(code) → atomic, single use
update demo_codes set used_at = now()
where code = $1 and used_at is null and expires_at > now()
returning client
00:00:00