feat(backend): 添加数据库迁移命令并优化日志配置

- 在 main.py 中添加 revision 和 upgrade 命令,用于生成和应用数据库迁移
- 优化日志配置,确保日志目录存在并添加异常处理
- 更新 README 文件,添加数据库迁移相关说明
- 重构设置文件,将数据库连接信息移至 Settings 类
- 更新数据库连接逻辑,使用新的 DB_URI 属性
This commit is contained in:
zhangtao
2025-03-13 22:44:02 +08:00
parent 0a6bd7aace
commit ab8e7ac0b7
19 changed files with 384 additions and 57 deletions
+1 -1
View File
@@ -30,4 +30,4 @@
```shell
# 进入后端根目录 backend 下运行
python3 main.py run
```
```