refactor(ssulbox): 자동 마이그레이션 제거, DDL 을 수동 문서로 이관

This commit is contained in:
skkim committed 2026-08-11 11:03:03 +09:00
1 parent 666c3bf6d1
commit ed1ba71bfe
7 files changed
+193 -641

No files matched your search

+4 -12
View File
@@ -31,20 +31,12 @@ async def lifespan(app: FastAPI):
from app.dashboard.migration import init_dashboard_table
await init_dashboard_table()
# 썰박스 스키마 보장 (모든 환경 - Alembic 부재 + create_db_tables 는 DEBUG 전용)
# 실패해도 앱 기동은 막지 않는다. 썰박스 스키마 문제로 castad 전체가 죽으면 안 된다.
# 썰박스 스키마는 앱이 만들지 않는다 — **DB 변경은 전부 수동**이 방침이다.
# 배포 전에 docs/manual_ddl/2026-07-30-ssulbox.sql 을 직접 실행할 것.
# (자동 마이그레이션 ensure_ssulbox_schema() 는 2026-07-30 제거)
if ssulbox_settings.SSULBOX_ENABLED:
try:
from app.ssulbox.migration import ensure_ssulbox_schema
await ensure_ssulbox_schema()
except Exception as e:
logger.error(
f"[ssulbox] 스키마 보장 실패 (다음 기동 시 재시도): "
f"{type(e).__name__}: {e}"
)
# 고아 잡 스윕 — 이전 프로세스가 죽으며 남긴 queued/running 을 환불·정리.
# 이건 DDL 이 아니라 데이터 정리(환불 UPDATE)라 앱 책임으로 남긴다.
# 기동 직후 인메모리 잡은 0개이므로 비터미널 잡은 전부 고아다.
# ⚠️ 이 불변식은 단일 워커 전제다(--workers 를 늘리면 정상 잡을 오판한다).
try: