将 Django 从 Postgres 迁移到 MySQL 时我会经历任何严重的冲击吗?
如果我正在使用 Postgres 开发一个 Django 站点并打算部署到 MySQL,我会遇到任何令人讨厌的意外吗?
是的,我已经阅读了这个问题!一些答案涉及 SQLite 中缺乏类型和约束安全性。据我了解,Postgres在严格性和正确性方面超过了MySQL。我能想到的潜在问题在这种情况下不是问题。
If I'm developing a Django site with Postgres and intend to deploy to MySQL, am I in for any nasty surprises?
Yes, I have read this question! Some answers concerned the lack of type and constraint safety in SQLite. As I understand it, Postgres exceeds MySQL in strictness and correctness. The potential issues that I can think of aren't an issue in this case.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我已经这样做了,遇到的一个大问题是区分大小写。 MySQL 不区分大小写,Postgres 则区分。当我移植数据时(我使用了固定装置),我遇到了 django 标记问题,认为它有重复的标记。我不得不破解它来修复,但回想起来,我应该坚持使用相同的数据库。
I've done this and one big headache I came across was case sensitivity. MySQL wasn't case sensitive, Postgres was. When I ported across my data (I used fixtures) I ran into issues with django-tagging thinking it had duplicate tags. I had to hack it up to fix but in retrospect I should have just stuck with the same database.
我遇到的一个问题是 MySQL 不支持回滚DDL更改。
当然,这对你来说可能不是问题:)
One problem I had was that MySQL doesn't support rolling back DDL changes.
Of course it may not be a problem for you :)