Django-恢复未应用的迁移

Django-恢复未应用的迁移,django,django-south,Django,Django South,我错跑了: 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 +

我错跑了:

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
如何还原它?

它刚刚创建了迁移文件,但您尚未通过运行命令
/manage.py migrate auth
应用这些迁移(请确保您没有这样做)。因此,手动删除迁移文件是安全的。

我无法(干净地)访问它们。这在库中的某个位置,因为这是contrib。是的,我知道这是contrib。但是你不能找到这个包并转到auth module和delete migrations文件夹,这有什么困难吗?转到django shell,键入这个
import django.contrib.auth as auth_module
,然后
print auth_module.\uu file__;
为你提供模块路径。