docs: 新增数据库迁移指南 + 迁移脚本,同步目录结构文档

- 新增 docs/数据库迁移.md: clone 后如何建表(alembic upgrade head)、日常升级、
  新增迁移、迁移文件名 vs revision id 的关系与去前缀注意事项、当前 9 条迁移链
- 新增 scripts/migrate.sh: 只做迁移不启服务(部署/CI 用),run.sh 已自动包含
- 后端技术实现.md 目录树: crud 并入 repositories、alembic 文件名去 hex 说明、
  补 docs/数据库迁移.md;接口层"调 repositories/integration"措辞同步
- README.md / docs/integrations 残留 crud 提法同步为 repositories

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
OuYingJun1024
2026-05-27 21:04:25 +08:00
parent a4d214964a
commit c61997b876
6 changed files with 117 additions and 13 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ shaguabijia-app-server/
│ │ └── user.py User 表
│ ├── schemas/
│ │ └── auth.py 登录/Token 相关 Pydantic
│ ├── crud/
│ │ └── user.py upsert_user_for_login 等
│ ├── repositories/ 数据访问(早期叫 crud,已并入)
│ │ └── user.py upsert_user_for_login 等(+ 钱包/签到/任务/省钱/发奖)
│ └── api/
│ ├── deps.py get_current_user (Bearer 校验)
│ └── v1/