Why use South during initial development?

后端 未结 5 1440
情话喂你
情话喂你 2021-02-12 22:16

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 mo

5条回答
  •  无人及你
    2021-02-12 22:53

    I've found South to be just as useful during development as afterwards, precisely because the table fields are changing so often. It's pretty annoying to have to drop a table and re-create it with syncdb just to add one field, especially if you have any test data at all. (You could also just modify the table directly in your DBMS, but then you have to be careful to use the same field type that Django is expecting, set the attributes like ON DELETE appropriately, etc.). Plus if anyone else is working on the project, you have to make sure to tell them to make exactly the same changes to their copy of the database. South makes it much simpler, IMO.

    That being said, it might be cool if South had an option to delete all previous migrations, so you could start with a clean slate when you're wrapping up the initial dev and starting to add real data. But ultimately those dozen or so extra migration files aren't really costing you anything.

提交回复
热议问题