Django migrate 命令
- 初始化app models 表:
python manage.py makemigrations (所有模型)
- 初始化app 某个模块:
python manage.py makemigrations app_name
- 迁移升级表:
python manage.py migrate
- 迁移某个app:
python manage.py migrate app_name
- 查看迁移文件的执行状态,可以用showmigrations命令查看:
python manage.py showmigrations admin
- 指定迁移表变化名字:
python manage.py makemigrations user --name "team_region"