create table if not exists public.server_status_overrides (
  id boolean primary key default true,
  supabase_egress_bytes bigint,
  vercel_fast_data_transfer_bytes bigint,
  vercel_edge_requests bigint,
  vercel_function_invocations bigint,
  vercel_active_cpu_hours numeric(10,4),
  updated_at timestamptz not null default now()
);

alter table public.server_status_overrides enable row level security;

drop policy if exists "Team all server_status_overrides" on public.server_status_overrides;
create policy "Team all server_status_overrides"
  on public.server_status_overrides
  for all
  using (get_my_role() = 'team')
  with check (get_my_role() = 'team');

insert into public.server_status_overrides (id)
values (true)
on conflict (id) do nothing;
