Files
hyungi_document_server/migrations/013_news_features.sql
Hyungi Ahn 7ca3abf17c feat: 뉴스 전용 페이지 + 분류 격리 + 읽음 상태
- /news 전용 페이지: 신문사 필터, 읽지않음 필터, 시간순 리스트, 미리보기
- 뉴스 분류 격리: ai_domain='News', classify 제거, embed만 등록
- is_read: 클릭 시 자동 읽음, 전체 읽음 API
- documents 목록에서 뉴스 제외 (source_channel != 'news')
- nav에 뉴스 링크 추가
- GET /api/news/articles, POST /api/news/mark-all-read

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 14:16:00 +09:00

10 lines
448 B
SQL

-- 읽음 상태
ALTER TABLE documents ADD COLUMN IF NOT EXISTS is_read BOOLEAN DEFAULT false;
-- 뉴스 인덱스
CREATE INDEX IF NOT EXISTS idx_documents_is_read ON documents(is_read) WHERE source_channel = 'news';
CREATE INDEX IF NOT EXISTS idx_news_feed ON documents(source_channel, created_at DESC);
-- 기존 뉴스 재분류 (taxonomy에서 분리)
UPDATE documents SET ai_domain = 'News', ai_sub_group = '' WHERE source_channel = 'news';