更新readme:数据迁移和生成CRUD,路由配置

This commit is contained in:
zhusr39924 2024-07-03 11:08:48 +08:00
parent afe3b042d9
commit ef5c73b468

View File

@ -147,7 +147,7 @@ git commit -m "clear cached"
``` ```
## 新的数据迁移 ## 新的数据迁移
执行数据库迁移命令(终端执行)
- 新建模型: - 新建模型:
- 在你的app目录下新建一个models目录__init__.py导入你需要迁移的models - 在你的app目录下新建一个models目录__init__.py导入你需要迁移的models
```python ```python
@ -182,7 +182,7 @@ git commit -m "clear cached"
... ...
from apps.xxx.your_app.models import * from apps.xxx.your_app.models import *
``` ```
- 执行脚本: - 执行数据库迁移命令(终端执行执行脚本
```shell ```shell
# 执行命令(生产环境): # 执行命令(生产环境):
python main.py migrate python main.py migrate