-- Basic record checks
select *
from public.survey_responses
order by created_at desc;

select id, created_at, family_status, situation, depends, adoption, followup
from public.survey_responses
order by created_at desc;

select name, contact, followup, created_at
from public.survey_responses
where contact is not null
order by created_at desc;

-- Optional: allow the frontend viewer page to read responses.
-- Warning: this makes survey_responses selectable by anonymous browser users.
drop policy if exists "Allow anonymous survey selects" on public.survey_responses;
create policy "Allow anonymous survey selects"
on public.survey_responses
for select
to anon
using (true);
