5

After Upgrade 2.2.5 To 2.3.0 when i am runnung php bin/magento setup:upgrade it give bellow error:

Schema creation/updates:

SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint 'test@test@002dtestnew/CMS_BLOCK_STORE_BLOCK_ID_CMS_BLOCK_BLOCK_ID' to system tables, query was: ALTER TABLE cms_block_store MODIFY COLUMN block_id smallint(6) NOT NULL , ADD CONSTRAINT CMS_BLOCK_STORE_BLOCK_ID_CMS_BLOCK_BLOCK_ID FOREIGN KEY (block_id) REFERENCES cms_block (block_id) ON DELETE CASCADE, ADD CONSTRAINT CMS_BLOCK_STORE_STORE_ID_STORE_STORE_ID FOREIGN KEY (store_id) REFERENCES store (store_id) ON DELETE CASCADE

1 Answer 1

9

The error was due to Duplicate tables in a database, BK_cms_block. I copied table and renamed it for backup purpose and the table was creating issue , so I just deleted BK tables and the error got resolved!

3
  • No one can think of such solution :) But Really it worked. Thanks a lot. Aug 13, 2019 at 6:28
  • Thanks for good feedback Aug 13, 2019 at 6:31
  • 1
    Works for me as well. Oct 30, 2019 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.