magento2: Magento 2.2.6 to 2.3.0 upgrade error - Cannot process definition to array for type enum

Preconditions (*)

  1. Magento 2.2.6 EE to
  2. Magento 2.3.0 EE

Steps to reproduce (*)

  1. bin/magento setup:upgrade

Expected result (*)

  1. Upgrade to complete

Actual result (*)

  1. Error generated:

bin/magento setup:upgrade

Cache cleared successfully
File system cleanup:
/home/ccarnell/Sites/xx-uk2/generated/code/Amasty
/home/ccarnell/Sites/xx-uk2/generated/code/Bazaarvoice
/home/ccarnell/Sites/xx-uk2/generated/code/Composer
/home/ccarnell/Sites/xx-uk2/generated/code/MSP
/home/ccarnell/Sites/xx-uk2/generated/code/Magento
/home/ccarnell/Sites/xx-uk2/generated/code/Migration
/home/ccarnell/Sites/xx-uk2/generated/code/Mirasvit
/home/ccarnell/Sites/xx-uk2/generated/code/Symfony
/home/ccarnell/Sites/xx-uk2/generated/code/VaxLtd
The directory '/xx-uk2/generated/metadata/' doesn't exist - skipping cleanup
Updating modules:
Schema creation/updates:
Cannot process definition to array for type enum

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 6
  • Comments: 29 (11 by maintainers)

Most upvoted comments

@orlangur Perhaps the error reporting in Magento logs should be improved? They don’t provide enough information.

Hello everyone - this isn’t limited to tables created by extensions this is also an issue if you have other tables sharing your M2 database - it is as if Magento goes through every table in the database regardless of whether it is associated with Magento2/an extension or not!

So for example if you had a wordpress installation in the same db as Magento I am confident this process will look through the wordpress tables.

To debug the faulty column, you can add var_dump in /vendor/magento/framework/Setup/Declaration/Schema/Db/DefinitionAggregator.php as below

image

It will show you the incorrect column, so you can fix that column. image

I stumbled upon the same error today, I share my experience to whom who could resolve in the same way.

In my case the error was thrown because I accidentally imported non M2 tables on M2 database, it seems that Magento checks every table present on its database.

So for me it just took to delete extraneous tables.