与Django South向后迁移 - Backwards migration with Django South

10/14 09:14
阅读数 0

问题:

Ok, so this seems like a really silly thing to ask, and I'm sure I'm missing something somewhere. 好的,所以这似乎是一个非常愚蠢的问题,而且我确定我在某处遗漏了某些东西。

How do you perform a backwards migration using South on Django? 你如何在Django上使用South进行向后迁移?

So I've tweaked my models, created a migration with schemamigration , run the migration with migrate , and now I realise that's not quite what I wanted and I want it back the way before. 所以我调整模型,创建了一个迁移schemamigration ,运行与移民migrate ,现在我知道这并不完全是我想要的,我想回去以前的样子。

Short of manually editing db tables and removing migration files, how should I go about rolling the migration back? 如果没有手动编辑数据库表并删除迁移文件,我应该如何进行迁移? I find references to backward migrations using South via Google, but have yet to find a solid code example for it. 我发现使用South通过谷歌进行向后迁移的参考,但还没有找到一个可靠的代码示例。

Can anyone help? 有人可以帮忙吗?


解决方案:

参考一: https://en.stackoom.com/question/OOXG
参考二: https://stackoom.com/question/OOXG
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部