refactor(db): 移除无意义 actor,修复 history 多租户与模型
- 删除 entries_history / audit_log / secrets_history 的 actor 列及写入逻辑 - MCP secrets_history 透传当前 user_id - Entry 增加 user_id,search 查询不再用伪 UUID - 迁移:保留 users.api_key,从 api_keys 表回退时生成新明文 key 并删表 - 文档:audit_log auth 语义、API Key 存储说明 Made-with: Cursor
This commit is contained in:
@@ -9,6 +9,7 @@ use uuid::Uuid;
|
||||
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow)]
|
||||
pub struct Entry {
|
||||
pub id: Uuid,
|
||||
pub user_id: Option<Uuid>,
|
||||
pub namespace: String,
|
||||
pub kind: String,
|
||||
pub name: String,
|
||||
@@ -184,7 +185,6 @@ pub struct AuditLogEntry {
|
||||
pub kind: String,
|
||||
pub name: String,
|
||||
pub detail: Value,
|
||||
pub actor: String,
|
||||
pub created_at: DateTime<Utc>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user