然后,我想用makemigrations更新django数据库,这表明它删除了模型employee,但是在使用migrate命令之后,我看到了一个错误,这个关系不存在。即使我创建了另一个,makemigrations也会检测到它,然后migrate说,relation project_employee..尝试了syncdb --all,但没有成功。exception was the direct cause of the following exception:
Traceback (most recent call l
django.db.utils.InternalError:(1050,“表'django_content_type‘已经存在”)python3 manage.pymigrate Operations to perform:
Apply all migrations: admin, auth,/django1/myproject/
当我尝试进行迁移( pythonmanage.py makemigrations)时,一切都通过了,我得到了有多少新模型的消息,等等。exception was the direct cause of the following exception:
File "manage.py/venv/lib/python3.6/site-
packages/django