版本跟踪,使用django自动化数据库模式更改 [英] Version track, automate DB schema changes with django
问题描述
我目前正在查看Python框架Django,用于未来的基于db的网络应用程序以及当前用PHP编写的某些应用程序的端口。在过去几年中,一个棘手的问题是跟踪数据库模式更改,并将这些更改部署到生产系统。我不敢要求能够撤消它们,但是当然对于测试和调试这将是一个伟大的功能。从这里的其他问题(例如这一个或这一个),我可以看到,我不是孤独和这不是一个微不足道的问题。
I'm currently looking at the Python framework Django for future db-based web apps as well as for a port of some apps currently written in PHP. One of the nastier issues during my last years was keeping track of database schema changes and deploying these changes to productive systems. I haven't dared asking for being able to undo them too, but of course for testing and debugging that would be a great feature. From other questions here (such as this one or this one), I can see that I'm not alone and that this is not a trivial problem. Also, I found many inspirations in the answers there.
现在,由于Django似乎非常强大,它有没有任何工具来帮助上面的?
Now, as Django seems to be very powerful, does it have any tools to help with the above? Maybe it's even in their docs and I missed it?
推荐答案
有至少两个第三方实用程序来处理数据库模式迁移, 南和 Django Evolution 。我没有尝试过任何一个,但我听说过一些关于南方的好东西,虽然进化已经有一段时间了。
There are at least two third party utilities to handle DB schema migrations, South and Django Evolution. I haven't tried either one, but I have heard some good things about South, though Evolution has been around a little longer.
另外,请参阅 SchemaEvolution Django维基。它只是一个关于迁移数据库的wiki页面。
Also, look at SchemaEvolution on the Django wiki. It is just a wiki page about migrating the db.
这篇关于版本跟踪,使用django自动化数据库模式更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!