magento / meta-for-magento2

33 stars 19 forks source link

Unable to apply data patch when running setup:upgrade #46

Open bulldogm11 opened 7 months ago

bulldogm11 commented 7 months ago

Preconditions (*)

  1. Magento 2.4.6-p3
  2. Meta Business 1.2.3

Steps to reproduce (*)

  1. Installed Meta Business extension via composer
  2. Ran setup:upgrade command

Actual result (*)

Received error:

Unable to apply data patch Meta\BusinessExtension\Setup\Patch\Data\DeleteLegacyData for module Meta_BusinessExtension. Original exception message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'titanfuel0727_mg1.eav_attribute' doesn't exist, query was: DELETE FROM eav_attribute WHERE (attribute_code = 'facebook_age_group')

ghost commented 7 months ago

@bulldogm11 I got the same error with magento 2.4.6-p3 and the reason was that my magento setup with prefix for tables in database. You can temporarily create a patch for this. There's even more scenario we can get this error. _E.g: Table 'facebook_catalogupdate' doesn't exist when trying to place order

likearocket commented 7 months ago

@bulldogm11 I got the same error with magento 2.4.6-p3 and the reason was that my magento setup with prefix for tables in database. You can temporarily create a patch for this. There's even more scenario we can get this error. _E.g: Table 'facebook_catalogupdate' doesn't exist when trying to place order

Are you able to provide a copy of the patch please? As we're also having this issue as per my thread https://github.com/magento/meta-for-magento2/issues/13

kestraly commented 4 months ago

Still problems with this and database prefixes

angelo983 commented 2 months ago

Duplicate of #13

likearocket commented 1 month ago

This should be fixed in v1.3.1 - I've closed my issues as the latest version resolves issues with my tables having prefixes.