nex_docus/docs/sdd/architecture/decisions/ADR-0001-hybrid-storage.md

19 lines
638 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ADR-0001混合架构「DB 权限 + FS 内容」
- **状态**Accepted
- **日期**:对应仓库基线
## 背景
需要平衡权限管理的可控性与内容数据的可迁移/透明性。
## 决策
结构化元数据(用户/项目/权限/菜单/日志/向量状态等)存 MySQL文档内容、图片、附件以原生文件存于服务器磁盘`STORAGE_ROOT` 下 `projects/<storage_key>`)。
## 后果
- 正向:文件即真理,备份/迁移只需拷贝目录 + 导出 DB。
- 代价:需要自行实现严格的路径安全校验(见 DV-0002 / NFR-3
## 关联
PO-1, PO-2, PO-3DV-0002NFR-3。