-- AI Discovery 랜딩 "URL 입력으로 시작하기" 신청 저장 테이블 -- 익명(anon) 방문자가 insert만 할 수 있고, 읽기·수정·삭제는 service_role 전용. create table if not exists public.discovery_leads ( id uuid primary key default gen_random_uuid(), url text not null, clinic_name text, contact text not null, source text not null default 'discovery_landing', status text not null default 'new', -- new | contacted | audited | closed created_at timestamptz not null default now() ); alter table public.discovery_leads enable row level security; -- 방문자 신청: insert만 허용 (select 정책이 없으므로 anon은 조회 불가) create policy "anon can insert discovery leads" on public.discovery_leads for insert to anon with check (true); comment on table public.discovery_leads is 'AI Discovery 랜딩 진단 신청. /discovery CTA(URL 입력으로 시작하기)에서 저장.';