From 9bef049af67f1345fc96dba029a196974aac3e40 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Thu, 9 Apr 2026 07:56:50 +0900 Subject: [PATCH] =?UTF-8?q?fix(migration):=20SQLAlchemy=20text()=20bind=20?= =?UTF-8?q?=EC=B6=A9=EB=8F=8C=20=ED=9A=8C=ED=94=BC=20=E2=80=94=20[:200]=20?= =?UTF-8?q?=ED=91=9C=EA=B8=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit migration 101 의 SQL 주석에 '[:200]' 이 들어 있었는데 SQLAlchemy text() 가 :200 을 named bind parameter 로 해석해 init_db() 가 'A value is required for bind parameter 200' 로 실패. fastapi startup 자체가 떨어지는 문제. 주석을 '첫 200자' 로 고쳐서 콜론+숫자/영문 패턴 제거. --- migrations/101_global_digests.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/101_global_digests.sql b/migrations/101_global_digests.sql index d513640..8a6f579 100644 --- a/migrations/101_global_digests.sql +++ b/migrations/101_global_digests.sql @@ -37,7 +37,7 @@ CREATE TABLE digest_topics ( topic_rank INTEGER NOT NULL, -- country 내 1..N (importance_score 내림차순) topic_label TEXT NOT NULL, -- LLM 생성 5~10 단어 한국어 (또는 fallback 시 "주요 뉴스 묶음") - summary TEXT NOT NULL, -- LLM 생성 1~2 문장 factual (또는 fallback 시 top member ai_summary[:200]) + summary TEXT NOT NULL, -- LLM 생성 1~2 문장 factual (또는 fallback 시 top member ai_summary 첫 200자) article_ids JSONB NOT NULL, -- [doc_id, ...] 코드가 주입 (LLM 생성 금지) article_count INTEGER NOT NULL, -- = jsonb_array_length(article_ids)