
ALTER TABLE public.announcements
ADD COLUMN IF NOT EXISTS pinned boolean NOT NULL DEFAULT false;

CREATE INDEX IF NOT EXISTS idx_announcements_pinned_created
ON public.announcements (pinned DESC, created_at DESC);
