Django database app in sync when the table does not successfully create models

python3 manage.py makemigrations --empty userinfo # userinfo app is your name, where you want to write your own app name

python3 manage.py makemigrations # normal again run the generated migration file command

python3 manage.py migrate # database synchronization

Guess you like

Origin www.cnblogs.com/hooo-1102/p/11888409.html