
ALTER TABLE public.announcements ADD COLUMN IF NOT EXISTS association_id uuid REFERENCES public.associations(id);

-- Allow anonymous users to read public announcements
CREATE POLICY "Anyone can read public announcements"
  ON public.announcements FOR SELECT
  TO anon
  USING (visibility = 'public' AND status = 'active');
