简体   繁体   English

从MyISAM迁移到Innodb时代码更改

[英]code changes when migrating from MyISAM to Innodb

I am just wondering do I need to alter "ruby on rails" code when migrating from MyISAM to InnoDB. 我只是想知道从MyISAM迁移到InnoDB时是否需要更改“ ruby​​ on rails”代码。

I want to migrate to InnoDB and it's known that deadlock is something that may happen working with InnoDB, do I need somehow threat all my inserts and updates to DB. 我想迁移到InnoDB,并且众所周知,使用InnoDB可能会发生死锁,我是否需要以某种方式威胁到我对DB的所有插入更新

By now, I used just standard methods of ActiveRecord without using transactions. 到目前为止,我仅使用ActiveRecord的标准方法,而不使用事务。

Thanks 谢谢

From my point of view that should be possible without any problems. 以我的观点,这应该是没有任何问题的。 Migrate to InnoDB, run your tests and see if anything breaks. 迁移到InnoDB,运行测试,看看有什么问题。 From my history of standard Rails projects I never ran into issues with deadlocks. 从我的标准Rails项目的历史来看,我从未遇到过死锁问题。 But at the end it depends on the code you've written. 但最后取决于您编写的代码。 There is no other way than trying it out. 除了尝试,别无他法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM