docs(awooop): record mcp audit migration owner gap
This commit is contained in:
@@ -3777,3 +3777,17 @@ ruff check apps/api/src/plugins/mcp/gateway.py apps/api/src/db/awooop_models.py
|
||||
|
||||
- 部署後必須確認 DB migration 有被套用,否則 production 仍會因 `tool_id NOT NULL` 擋住 Gate 1 / Gate 2 blocked audit。
|
||||
- 下一步繼續收斂 direct provider / legacy MCP caller,讓 MCP Gateway 成為真正 choke point。
|
||||
|
||||
### Production 套用紀錄
|
||||
|
||||
- Gitea migration workflow 使用 `awoooi_migrator` 限權帳號,套用此 migration 時失敗於 `must be owner of table awooop_mcp_gateway_audit`。
|
||||
- 現場確認 table owner 為 `awoooi`,`tool_id` 原本仍為 `NOT NULL`。
|
||||
- 已用 table owner 受控執行:
|
||||
|
||||
```sql
|
||||
ALTER TABLE awooop_mcp_gateway_audit
|
||||
ALTER COLUMN tool_id DROP NOT NULL;
|
||||
```
|
||||
|
||||
- 套用後確認 `tool_id_not_null=false`。
|
||||
- 後續需獨立修正 migration 權限模型:`awoooi_migrator` 目前可新增部分 schema,但不能 ALTER 由 `awoooi` 擁有的既有表;這會讓「修既有表」類 migration 在 CI 中失敗。
|
||||
|
||||
Reference in New Issue
Block a user