即使迁移保存在数据库中,南(django 应用程序)也不会更改表
好吧,基本上,当我使用 Fabric 进行部署时,south migrate 命令正在远程计算机上运行,并且 Fabric 输出每次迁移(即其中 10 个)已完成。然而,检查(通过解释)第 10 次迁移应更改的表显示该表未更改(是的,第 10 次迁移文件存在)。因此,基本上,第 9 次迁移应用得很好,但第 10 次迁移却没有,即使南迁移历史表中有迁移 #10 的迁移条目。
更奇怪的是,当我在远程服务器上手动执行迁移时,它运行良好(假设南迁移历史表中没有迁移 10 的条目),并且在检查 w/explain 时该表会进行适当更改。
关于问题是什么有什么想法吗?
谢谢你们!
Ok so basically when I deploy using Fabric, the south migrate command is being run on the remote machine and fabric outputs that each migration (i.e. 10 of them) were completed. However checking (via explain) the table that the 10th migration should alter reveals that the table was not altered (yes, the 10th migration file exists). So basically the 9th migration was applied fine, but the 10th was not, even though there is a migration entry for migration #10 in the south migration history table.
Even more strangely, when I do the migration manually on the remote server, it runs fine (assuming there is no entry for migration 10 in the south migration history table) and the table is altered appropriately when checked w/ explain.
Any ideas on what the problem is?
Thanks guys!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是否对南方迁徙更加冗长了?您还可以使用 --show=debug 从 fab 运行中获取更多信息。
Have you upped the verbosity on the south migrations? Also you can use --show=debug to get more info out of the fab runs.