47fe375952a8d0af966cc4ecf6b9cd411b658f0b
All checks were successful
CD Pipeline / deploy (push) Successful in 3m42s
統帥 2026-05-04 Telegram 報錯:「ai_calls relation does not exist」
根因:
cd.yaml 原邏輯 `git diff HEAD~1 HEAD -- migrations/` 只看單一 commit。
v5.0 migrations 024-028 在 commit 4648673(最早),後續 12 個 commit
都不含 migration → CD「自動 apply」step 一次都沒觸發。
→ ai_calls / mcp_calls / ai_call_budgets / rag_query_log /
learning_episodes / embedding_signature 全部缺表 / 缺欄位。
修補:改邏輯跑 migrations/02[4-9]_*.sql + 03[0-9]_*.sql 等 v5.0 範圍
- 所有 v5.0 migration 是 IF NOT EXISTS / WHERE NOT EXISTS 冪等保證
(critic-A11 第 1 輪 B2/H1/H2/H3/M1/M2 修補時加的)
- 重跑 100% 無害,已建立的表會被 IF NOT EXISTS 跳過
- 026 / 027 / 028 含 ivfflat/CONCURRENTLY 走 transactionless apply
push 後 CD 跑完 → ai_calls 表立即存在 → 23:55 token 日報恢復正常
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
EwoooC — 商品看板 + 業績報表 + AI KM (Flask + pgvector, Docker Compose on 188)
Languages
PostScript
59.7%
Python
30.9%
HTML
4.2%
CSS
2.1%
JavaScript
1.9%
Other
1.1%