Files
photography/backend/scripts/CLAUDE.md
xujiang 386666660f
Some checks failed
部署后端服务 / 🚀 构建并部署 (push) Failing after 7m20s
feat: 重构CLAUDE.md文档体系,实现模块化轻量级设计
- 重构根目录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>
2025-07-16 13:16:01 +08:00

786 B

脚本目录

🛠️ 脚本列表

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 本地测试迁移

🚀 使用方式

# 生产环境初始化
./scripts/init-production-db.sh

# 执行迁移
./scripts/production-migrate.sh up

# 测试迁移
./scripts/test-migration.sh

⚠️ 注意事项

  • 生产脚本需要数据库连接权限
  • 迁移前建议备份数据
  • 本地测试使用SQLite