1.删除所有的app下 migations 文件 但是保留__init__.py rm -rf {api,backend}/migrations/* touch {api,backend}/migrations/__init__.py 2.删除数据库里 的所有django_migrations表的记录 3. python manage.py makemigtaions python3 manage.py migrate #出现django.db.utils.InternalError: (1050, "Table 'django_content_type' already exists") python manage.py migrate --fake 再 python manage.py migrate #再试试python manage.py makemigtaions 出现No changes detected 就说明以上步骤都没问题 4.再 python manage.py migrate --fake app zero 出现 Operations to perform: Unapply all migrations: api Running migrations: Rendering model states... DONE Unapplying backend.0001_initial... FAKED Unapplying api.0001_initial... FAKED 说明没问题 5.删除migrations 下所有app除了__init__.py 所有文件 python manage.py makemigrations python manage.py migrate --fake-initial