问题描述
我最近开始深入文档,发现它有两种不同类型的迁移:
I recently began digging into the South documentation and discovered that it had two distinct types of migrations:
- schemamigration
- datamigration
由于我的无知,我一直在为所有事物使用方案。换句话说,即使我有一些真正的数据迁移,我只是用南方的模式迁移来转换数据(没有明显的后果)。
As a result of my ignorance, I've always used schemamigrations for everything. In other words, even if I had something that was truly a "data migration", I'd simply used South's schemamigration to convert the data (with no apparent consequences).
当我阅读文档时,我没有看到这种方法的错误。有没有人知道两个迁移之间的根本区别,以及我坚持使用模式的错误呢?
As I read the documentation, I'm not seeing a fault in this approach. Does anyone know the fundamental difference between the two migrations and what I may be missing by sticking with schemamigrations?
推荐答案
的南方:
正如所示,唯一的区别是数据迁移不是
干运行,如果你有一个数据库需要它(MySQL)。否则,
几乎没有什么区别,至少在目前 - 管理
命令有所不同(这一切都是关于用户界面分离,基本上是
)。
As that shows, the only difference is that data migrations aren't dry-run if you have a database that requires it (MySQL). Otherwise, there's little difference, at least at the moment - the management commands differ, though (it's all about user interface separation, essentially).
这篇关于与数据迁移相比,南方数据迁移做了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!