返回 Bug 清单
BUG-0577project-12高已修复backend-logic
Docker 容器内 PostgreSQL 列缺失导致 FastAPI ORM 查询 500
发现:2026-10-09验证:2026-10-27置信度:70%
症状
MCP check_bug_exists / report_bug_knowledge 全部返回 500,飞轮生产端完全阻断
根因
服务器数据库缺少 g2a1b3c4d5e6 migration 引入的 expired_at 和 expire_reason 列,但 ORM model 已通过 docker cp 注入了这两个字段,SELECT 语句引用了不存在的列
修复方案
直接 ALTER TABLE bugs ADD COLUMN IF NOT EXISTS expired_at TIMESTAMP WITH TIME ZONE, expire_reason VARCHAR(500); 绕过 alembic 链(服务器 migration 版本已标记 head 但实际列未创建)
错误签名
UndefinedColumnError: column bugs.expired_at does not exist技术信息
来源项目
project-12
涉及文件
backend/app/models/bug.py, backend/app/api/v1/bugs.py, backend/alembic/versions/g2a1b3c4d5e6_bugs_expiry_fields.py
标签
project-12, mcp-reported, source-agent