create table if not exists public.discord_push_stats (
  owner_id uuid primary key,
  sent_count bigint not null default 0,
  last_sent_at timestamptz null,
  last_error text null,
  last_error_at timestamptz null,
  last_messages jsonb not null default '[]'::jsonb,
  updated_at timestamptz not null default now()
);

create index if not exists idx_discord_push_stats_updated_at
  on public.discord_push_stats (updated_at desc);
