diff --git a/src/api/card_routes.py b/src/api/card_routes.py index 5577caa..581ac4a 100644 --- a/src/api/card_routes.py +++ b/src/api/card_routes.py @@ -26,7 +26,10 @@ def _bb(project_id: str) -> Blackboard: def _card_ops(project_id: str) -> CardOps: - return CardOps(_db_path(project_id)) + from src.blackboard.db import init_db + db = _db_path(project_id) + init_db(db) # 确保 DB 已迁移 + return CardOps(db) def _q(project_id: str) -> Queries: