更新readme:数据迁移和生成CRUD,路由配置
This commit is contained in:
parent
5af56e956c
commit
afe3b042d9
@ -18,11 +18,11 @@ Typer 官方文档:https://typer.tiangolo.com/
|
||||
|
||||
SQLAlchemy 2.0 (官方): https://docs.sqlalchemy.org/en/20/intro.html#installation
|
||||
|
||||
SQLAlchemy 1.4 迁移到 2.0
|
||||
(官方):https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html#whatsnew-20-orm-declarative-typing
|
||||
SQLAlchemy 1.4 迁移到 2.0 (官方):https://docs.sqlalchemy.org/en/20/changelog/whatsnew_20.html#whatsnew-20-orm-declarative-typing
|
||||
|
||||
PEP 484 语法(官方):https://peps.python.org/pep-0484/
|
||||
|
||||
|
||||
## 项目结构
|
||||
|
||||
使用的是仿照 Django 项目结构:
|
||||
@ -133,7 +133,6 @@ http://127.0.0.1:9000/docs
|
||||
```
|
||||
|
||||
Git更新ignore文件直接修改gitignore是不会生效的,需要先去掉已经托管的文件,修改完成之后再重新添加并提交。
|
||||
|
||||
```
|
||||
第一步:
|
||||
git rm -r --cached .
|
||||
@ -148,9 +147,7 @@ git commit -m "clear cached"
|
||||
```
|
||||
|
||||
## 新的数据迁移
|
||||
|
||||
执行数据库迁移命令(终端执行)
|
||||
|
||||
- 新建模型:
|
||||
- 在你的app目录下新建一个models目录,__init__.py导入你需要迁移的models
|
||||
```python
|
||||
|
Loading…
x
Reference in New Issue
Block a user