Search code examples
djangodjango-modelsdjango-south

Why use South during initial development?


I'm wondering about the advantages of using (django) South during heavy initial development of a project.

At the early stages of development there's normally rapid model changing, frequent branching and merging (especially if you use a development strategy like git-flow) and very little, if any, stored data. Why would you want to keep of these initial model changes? What are the advantages/disadvantages?

I'm under the impression that it's easier to wait until the development settles down (and you have data you actually want to keep) before activating South and performing an initial migration. Is it possible to do that? Would you want to do that?


Solution

  • As soon as I am about push a commit that other people need to use, I create a migration so they can still have a working copy.

    If you are working alone(and not worrying about deployment), this is not an issue and you can wait until the last possible moment to create a migration.

    Once you begin working with others, it makes life easier to quickly make migrations so it becomes a workflow habit and everyone is on the same database page.

    Also, syncdb is not an option if you are simply modifying a field. It gets incredibly annoying to have to blow away a table just for adding, deleting or modifying fields.

    If I have a bunch of schema migrations that I added, sometimes I will combine them(rollback and delete them and create a new jumbo migration) into a single migration. But normally, the number of migrations doesn't bother me because they don't cost me anything really.