Magento — “SQLSTATE[23000]: Integrity constraint violation..” on customer update

[亡魂溺海] 提交于 2019-12-05 10:07:10
Jonathan Day

The issue is because when you migrated your database, mysql helpfully restarts the id columns that are auto-increment and Magento has some hardcoded values that assume that IDs start from zero. You need to disable foreign_key_checks when you import the data.

Your edit is attempting to re-CREATE the user, instead of UPDATE-ing the existing user. It's a bug with the plugin. You may want to report it to the author or wait for an update to come out.

If you are trying to import SQL file , make sure that you “Disable foreign key checks” . For that just add SET FOREIGN_KEY_CHECKS = 0; at the start of SQL file. Also add SET FOREIGN_KEY_CHECKS = 1; at the end of file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!