fix(db): contact_requests.phone 컬럼 보장 + project_milestones anon 전체 CRUD 정책 제거

- contact route가 phone을 INSERT하나 schema에 컬럼 부재 → 문의 DB 저장이
  조용히 실패(이메일은 정상)할 수 있어 ADD COLUMN IF NOT EXISTS로 보장
- 003_fix_quotes_rls의 'Admin manage milestones'(anon FOR ALL USING true) 제거:
  비로그인 누구나 고객 마일스톤 CRUD 가능한 보안 구멍. 실제 접근은 전부
  service_role 서버 API라 제거해도 무영향
- schema.sql에 phone 동기화, contact route의 불필요한 created_at 명시 제거

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 15:13:59 +09:00
parent 3dc6a28979
commit 1b4e6803a2
3 changed files with 34 additions and 1 deletions

View File

@@ -112,6 +112,7 @@ create table public.contact_requests (
user_id uuid references public.profiles(id) on delete set null,
email text not null,
name text,
phone text, -- 연락처 (선택)
service text not null, -- 문의 서비스 종류
message text not null,
status text default 'pending', -- 'pending' | 'in_progress' | 'completed'