cancel
Showing results for 
Search instead for 
Did you mean: 

on setup:upgrade shows 1823 Failed to add the foreign key constraint 'dbname/INVENTORY_SOURCE_ITEM_S

on setup:upgrade shows 1823 Failed to add the foreign key constraint 'dbname/INVENTORY_SOURCE_ITEM_S

Hi,

I am using Magento ver. 2.3.3 when I run command bin/magento setup:upgrade displayed SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint 'dbname/INVENTORY_SOURCE_ITEM_SOURCE_CODE_INVENTORY_SOURCE_SOURCE_CODE' to system tables, query was: ALTER TABLE `inventory_source_item` ADD CONSTRAINT `INVENTORY_SOURCE_ITEM_SOURCE_CODE_INVENTORY_SOURCE_SOURCE_CODE` FOREIGN KEY (`source_code`) REFERENCES `inventory_source` (`source_code`) ON DELETE CASCADE 

 

Can anyone help me for this.

Thanks in advance Smiley Happy