create table if not exists auth_rate_limits (
  bucket text primary key,
  attempts integer not null default 0,
  window_start timestamptz not null default now(),
  expires_at timestamptz not null
);

create index if not exists idx_auth_rate_limits_expires_at
  on auth_rate_limits(expires_at);
