【发布时间】:2012-07-06 16:22:49
【问题描述】:
我有一个现有的 Django 模型,它引用代理模型 users.User 作为 ManyToMany 字段。我最近为模型创建了一个初始的南迁移,并使用 --fake 标志毫无问题地应用它。
现在,如果我重新克隆我的存储库,运行 syncdb,然后尝试应用我的迁移,我会在处理具有 ManyToMany 字段的模型时收到此 South 错误:
Running migrations for <app>:
- Migrating forwards to 0001_initial.
> <app>:0001_initial
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
... (traceback)
raise KeyError("The model '%s' from the app '%s' is not available in this migration." % (model, app))
KeyError: "The model 'user' from the app 'users' is not available in this migration."
我是否需要每次都为这个特定应用伪造迁移?有人遇到过这个错误吗?
【问题讨论】:
标签: django django-south