Does Django natively support migrations

2019-07-21 08:05发布

问题:

I've heard that all the new web frameworks like ROR, Django etc. follow the general principle of Agile and TDD. One part of following Agile and TDD is to make up your own design as you go from one iteration to other. This means that models and their schema will evolve with different versions of the app. I know that ROR supports schema migrations natively, However I'm not sure about django. My major concern is that how can I decide upfront all the schema related issues. Isn't it going back to waterfall kind of design philosophy.

I also know that there are external packages like 'south' for schema migrations. But this question is really about inquiring as to why django doesn't support migrations natively like ROR

回答1:

Django 1.7 will be the first version providing schema migrations in the core source. check the dev. version of the docs regarding this topic.

Andrew Godwin, the creator of South, did this work, backed by a kickstarter project.



回答2:

It is currently been added into the framework - refer Migrations and most likely will be available in version 1.7.

There is 3rd party django app south, that can be used for this purpose.



回答3:

South is excellent Plugin for Schema Migrations. Hands Down.