- 重构根目录CLAUDE.md为项目总览(60行精简版) - 细化backend模块CLAUDE.md为开发指南 - 新增各子模块CLAUDE.md文件: - api/desc/ - API定义模块 - internal/handler/ - 请求处理器 - internal/logic/ - 业务逻辑层 - internal/model/ - 数据模型层 - internal/middleware/ - 中间件层 - internal/svc/ - 服务上下文 - configs/ - 配置目录 - deploy/ - 部署配置 - pkg/ - 公共库 - scripts/ - 工具脚本 - configs/sql/ - SQL脚本 - 修复PostgreSQL SSL配置参数 - 清理旧的backend-old目录 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
34
backend/scripts/CLAUDE.md
Normal file
34
backend/scripts/CLAUDE.md
Normal file
@ -0,0 +1,34 @@
|
||||
# 脚本目录
|
||||
|
||||
## 🛠️ 脚本列表
|
||||
```
|
||||
scripts/
|
||||
├── init-production-db.sh # 生产数据库初始化
|
||||
├── production-db-setup.sh # 数据库配置
|
||||
├── production-migrate.sh # 生产环境迁移
|
||||
└── test-migration.sh # 测试迁移
|
||||
```
|
||||
|
||||
## 🎯 脚本用途
|
||||
| 脚本 | 用途 |
|
||||
|---|---|
|
||||
| `init-production-db.sh` | 首次部署数据库 |
|
||||
| `production-migrate.sh` | 执行数据库迁移 |
|
||||
| `test-migration.sh` | 本地测试迁移 |
|
||||
|
||||
## 🚀 使用方式
|
||||
```bash
|
||||
# 生产环境初始化
|
||||
./scripts/init-production-db.sh
|
||||
|
||||
# 执行迁移
|
||||
./scripts/production-migrate.sh up
|
||||
|
||||
# 测试迁移
|
||||
./scripts/test-migration.sh
|
||||
```
|
||||
|
||||
## ⚠️ 注意事项
|
||||
- 生产脚本需要数据库连接权限
|
||||
- 迁移前建议备份数据
|
||||
- 本地测试使用SQLite
|
||||
Reference in New Issue
Block a user