我错误地跑了:
python manage.py schemamigration auth --initial
立即得到:
+ Added model auth.Permission
+ Added unique constraint for ['content_type', 'codename'] on auth.Permission
+ Added model auth.Group
+ Added M2M table for permissions on auth.Group
+ Added model auth.User
+ Added M2M table for groups on auth.User
+ Added M2M table for user_permissions on auth.User
Created 0001_initial.py. You can now apply this migration with: ./manage.py migrate auth
由于我不想迁移django.contrib.auth
如何还原它?
答案 0 :(得分:0)
它刚刚创建了迁移文件,但您尚未通过运行命令./manage.py migrate auth
来应用这些迁移(请确保您没有这样做)。因此,手动删除迁移文件是安全的。