magento2 - 一般错误:1822 无法添加外键约束
问题描述
我正在将我们的 Magento 2.3.3 移动到开发服务器,这样我就可以继续开发它并升级到 2.4 我已经移动了所有东西,但是当我运行 php bin/magento setup:upgrade 命令时,我收到了这个错误:
Updating modules:
Schema creation/updates:
SQLSTATE[HY000]: General error: 1822 Failed to add the foreign key constaint. Missing index for constraint 'STORE_GROUP_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID' in the referenced table 'store_website', query was: ALTER TABLE `store_group` ADD CONSTRAINT `STORE_GROUP_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE
不知道在这里做什么。
解决方案
推荐阅读
- ios - 运行 ios 应用程序时出现 Cocoapods 错误,导致 pod install 出错
- selenium - 抓取angellist启动数据
- idris - 构造函数中的表达式时,“MkFoo 的返回类型必须在 Foo 中”
- javascript - React Router 与特定的 React 组件不兼容
- node.js - searching in database (mongoDB) with millions of records takes more than 1 minute to retrieve data
- ionic-framework - 突然使用 Ionic 我所有的图标和图像都不适用于所有项目
- c# - 将错误的模型项传递给查看
- c# - Xamarin 表单垂直选项被忽略
- docker - 在 docker ubuntu 20.04 上无法访问另一个端口,但 80
- node.js - 拥有多个 Dynos 并没有速度 - 我做错了什么?