为什么在初期开发中使用南方? [英] Why use South during initial development?

查看:94
本文介绍了为什么在初期开发中使用南方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在项目重要开发过程中使用(django)South的优势。

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

在开发的早期阶段,通常快速的模型更改,频繁的分支和合并(特别是如果您使用像git-flow这样的开发策略),而且很少(如果有的话) ,存储数据。为什么要保持这些初始模型更改?有什么优点/缺点?

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?

推荐答案

一旦我推荐其他人需要使用的承诺,我创建一个迁移,所以他们仍然可以有一个工作副本。

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.

此外,如果您只是修改一个字段,syncdb不是一个选项。如果我添加了一堆模式迁移,有时候我会添加,删除或修改字段。令人难以置信的烦恼是不得不为了添加,删除或修改字段而吹掉一个表。

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.

这篇关于为什么在初期开发中使用南方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆