1

I have updated magento from 2.2.7 to 2.3.1 and I get a setup:upgrade error but have no idea where to look.

The error is for the following query:

SHOW INDEXES FROM catalog_category_product_2.0.7 WHERE Non_unique = 1

There is an error because the table has no quotes and the version 2.0.7 is not valid.

Any help is appreciated.

Update 1: Added a screenshot

enter image description here

Update 2: Not quoted

It looks like that in the following file the with readIndexes the $tableName is not quoted. Not any of the functions the tablename is quoted and the errors continue.

vendor/magento/framework/Setup/Declaration/Schema/Db/MySQL/DbSchemaReader.php

3
  • what instructions did you follow? 2.2.X to 2.3.X is not just a composer version increase and then "setup:upgrade"... Commented Apr 2, 2019 at 12:43
  • Check your module version and upgrade it.
    – Mahendra
    Commented Apr 2, 2019 at 12:56
  • I had followed an instruction I had to update the composer psr4 version. Also updated most of the composer modules. But this error does not say which module produces the error.
    – Niels
    Commented Apr 2, 2019 at 14:51

1 Answer 1

0

According to the error screenshot, it seems that some of the custom extension have fired custom sql query as

SHOW INDEXES FROM catalog_category_product_2.0.7 WHERE `Non_unique` = 1

Actually the table name contains .(dot) so the query should be as below.

SHOW INDEXES FROM `catalog_category_product_2.0.7` WHERE `Non_unique` = 1

Try to find out the module which fires this query and make the changes.

1
  • Yes I know this is why there is an error. I now have updated the vendor/magento file where the SHOW INDEXES query is executed and added the '`' on every table query. But is a very bad solution
    – Niels
    Commented Apr 3, 2019 at 16:37

Your Answer

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

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