Django migrate 命令

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