Django-South无法检测数据库更改 [英] Django-south not detecting DB changes
本文介绍了Django-South无法检测数据库更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经从svn更新了我们的项目,并且有新的迁移文件。
当我使用时:
I have updated our project from svn and I have new migration files. When I use :
./work/manage.py schemamigration mypackage --auto
我收到此消息:
Nothing seems to have changed.
但是数据库已更改!为什么南方无法检测到任何变化?
But the database has changed! Why south couldn't detect any change?
预先感谢
推荐答案
如果您已经有了迁移文件,则无需运行 schemamigration
,因为它仅生成迁移文件。要将迁移文件应用到数据库,请运行:
If you already have the migration files, there is no need to run schemamigration
as that just generates the migration files. To apply the migration files to the database, run:
./work/manage.py migrate mypackage --merge
merge
标志将因此运行所有丢失的迁移SVN更新。
The merge
flag will run any missed migrations as a result of an SVN update.
这篇关于Django-South无法检测数据库更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文