问题描述
我似乎无法正常工作。
我需要南方为一堆应用程序进行迁移。
- 下载0.7.3
- 解压缩,运行setup.py开发tur orial))b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b b))))))))))))))))))))) $ b
-
我做
这一点从我所了解的南方应该是同步正确吗?
此后我还做了一些事情,抱怨说我在数据库中没有south_migrationhistory表。
PS。我正在与Django 1.2.7,python 2.6,在Windows7上
在我看来,像南方的一个错误。 / p>
另外这可能是由于执行错误的假设,如:运行 schemamigration --auto south
等等。我的建议将通过运行 python setup.py install
或通过 easy_install 或 pip
进行安装南方文档说:一旦添加了South,您需要运行./manage.py syncdb来制作South迁移跟踪表(South不会为自己的模型使用迁移,因为各种原因)
但是您的输出表示,南部跳过了自己的模型表,因为它认为南方应用程序使用迁移
作为一种解决方法,您可以使用
python manage.py syncdb --all
哪些导致所有表,而不考虑迁移进行同步,
python manage.py migrate --fake
伪造迁移。
I cannot seem to get this working.
I need South to do migrations for a bunch of apps.
- Downloaded south 0.7.3
- Unzipped, ran setup.py develop (as it says in the turorial)
Double checked to see if it south is where it should be by going to python interpreter and doing (no errors)
I do
-At this point from what I understand south should have been synced correct?Anything else I do after this, complains that I have no south_migrationhistory tables in the database.
PS. I am working with Django 1.2.7, python 2.6, on Windows7
解决方案 It seems to me like a bug in South.
Also this may be cause by doing wrong thigs like: running schemamigration --auto south
and etc. My suggestion would be install it by running python setup.py install
or through easy_install or pip
South documentation says: "Once South is added in, you’ll need to run ./manage.py syncdb to make the South migration-tracking tables (South doesn’t use migrations for its own models, for various reasons)."
But your output says that south skipped making tables for its own models because it thought south app used migrations
As a workaround you could use
python manage.py syncdb --all
Which causes all tables regardless of migrations to be synchronized and
python manage.py migrate --fake
to fake migrations.
这篇关于用Django安装South的问题(south_migrationhistory表不会被创建)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!