magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.44k stars 9.29k forks source link

Magento Amazon Extension fails to install if the database has a PREFIX #35792

Closed adrianbsystems closed 2 years ago

adrianbsystems commented 2 years ago

Preconditions and environment

Steps to reproduce

Steps to replicate: composer require magento/module-amazon composer require magento/services-connector php bin/magento setup:upgrade

Expected result

Expected result: setup completes normally

Actual result

Actual Result: Unable to apply patch Magento\Amazon\Setup\Patch\Schema\DropUnnecessaryIndexesLeftFromOldSchema for module Magento_Amazon. Original exception message: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2.channel_amazon_account' doesn't exist, query was: SHOW INDEX FROM channel_amazon_account

Additional information

If the database PREFIX is manually added the the files below, setup completes successfully, But this seems not the correct procedure ?

/vendor/magento/module-amazon/Setup/Patch/Schema/DropUnnecessaryIndexesLeftFromOldSchema.php

/**

private $indexesToDelete = [ 'nY3g_channel_amazon_account' => [ 'CHANNEL_AMAZON_ACCOUNT_UNIQUEVALUE' => 'unique', 'MERCHANT_ID_MERCHANT_ID' => 'index', ], 'nY3g_channel_amazon_account_listing' => [ 'CHANNEL_AMAZON_ACCOUNT_LISTING_UNIQUEVALUE' => 'unique', 'MERCHNAT_ID_MERCHANT_ID' => 'index', ], 'nY3g_channel_amazon_account_order' => [ 'CHANNEL_AMAZON_ACCOUNT_ORDER_UNIQUEVALUE' => 'unique', 'MERCHNAT_ID_MERCHANT_ID' => 'index', ], 'nY3g_channel_amazon_action' => [ 'CHANNEL_AMAZON_ACTION_UNIQUEVALUE' => 'unique', 'CHANNEL_AMAZON_ACTION_UNIQUEVALUE_COMMAND' => 'unique', ], 'nY3g_channel_amazon_attribute' => [ 'AMAZON_ATTRIBUTE_AMAZON_ATTRIBUTE' => 'index', 'CHANNEL_AMAZON_ATTRIBUTE_UNIQUEVALUE' => 'unique', 'ID_ID' => 'index', ], 'nY3g_channel_amazon_attribute_value' => [ 'ASIN_ASIN' => 'index', 'CHANNEL_AMAZON_ATTRIBUTE_VALUE_UNIQUEVALUE' => 'unique', 'ID_ID' => 'index', 'PARENT_ID_PARENT_ID' => 'index', ], 'nY3g_channel_amazon_defect' => [ 'CHANNEL_AMAZON_ACCOUNT_DEFECT_UNIQUEVALUE' => 'unique', ], 'nY3g_channel_amazon_error_log' => [ 'ID_ID' => 'index', ], 'nY3g_channel_amazon_listing' => [ 'ASIN_ASIN' => 'index', 'CATALOG_PRODUCT_ID_CATALOG_PRODUCT_ID' => 'index', 'CHANNEL_AMAZON_ACCOUNT_LISTING_UNIQUEVALUE' => 'unique', 'CONDITION_CONDITION' => 'index', 'IS_SHIP_IS_SHIP' => 'index', 'LISTING_ID_LISTING_ID' => 'index', 'LIST_STATUS_LIST_STATUS' => 'index', 'MERCHANT_ID_MERCHANT_ID' => 'index', ], 'nY3g_channel_amazon_listing_log' => [ 'ID_ID' => 'index', ], 'nY3g_channel_amazon_listing_multiple' => [ 'CHANNEL_AMAZON_LISTING_MULTIPLE_UNIQUEVALUE' => 'unique', ], 'nY3g_channel_amazon_listing_rule' => [ 'MERCHANT_ID_MERCHANT_ID' => 'index', ], 'nY3g_channel_amazon_listing_variant' => [ 'CHANNEL_AMAZON_LISTING_VARIANT_UNIQUEVALUE' => 'unique', ], 'nY3g_channel_amazon_order' => [ 'CHANNEL_AMAZON_ORDER_UNIQUEVALUE' => 'unique', 'ORDER_ID_ORDER_ID' => 'index', ], 'nY3g_channel_amazon_order_item' => [ 'CHANNEL_AMAZON_ORDER_ITEM_UNIQUEVALUE' => 'unique', 'ORDER_ID_ORDER_ID' => 'index', ], 'nY3g_channel_amazon_order_reserve' => [ 'CHANNEL_AMAZON_ORDER_RESERVE_UNIQUEVALUE' => 'unique', 'ORDER_ID_ORDER_ID' => 'index', ], 'nY3g_channel_amazon_order_tracking' => [ 'ORDER_ID_ORDER_ID' => 'index', ], 'nY3g_channel_amazon_pricing_bestbuybox' => [ 'ASIN_ASIN' => 'index', 'CHANNEL_AMAZON_PRICING_BESTBUYBOX_UNIQUEVALUE' => 'unique', 'COUNTRY_CODE_COUNTRY_CODE' => 'index', ], 'nY3g_channel_amazon_pricing_index' => [ 'ASIN_ASIN' => 'index', 'CHANNEL_AMAZON_PRICING_INDEX_UNIQUEVALUE' => 'unique', 'CONDITION_CONDITION' => 'index', 'ID_ID' => 'index', 'PARENT_ID_PARENT_ID' => 'index', 'PRODUCT_ID_PRODUCT_ID' => 'index', 'SHIPPING_CALCULATED_SHIPPING_CALCULATED' => 'index', 'STOP_RULES_STOP_RULES' => 'index', ], 'nY3g_channel_amazon_pricing_lowest' => [ 'ASIN_ASIN' => 'index', 'COUNTRY_CODE_COUNTRY_CODE' => 'index', ], 'nY3g_channel_amazon_pricing_rule' => [ 'ID_ID' => 'index', ], 'nY3g_channel_amazon_quantity_index' => [ 'CHANNEL_AMAZON_QUANTITY_INDEX_UNIQUEVALUE' => 'unique', 'ID_ID' => 'index', ], ];

/vendor/magento/module-amazon/Setup/Patch/Schema/DropLegacyPreV4Columns.php

/**

private $columnsToDrop = [ ['table' => 'nY3g_channel_amazon_account', 'column' => 'setup_step'], ['table' => 'nY3g_channel_amazon_action', 'column' => 'api_group'], ['table' => 'nY3g_channel_amazon_action', 'column' => 'api_action'], ['table' => 'nY3g_channel_amazon_action', 'column' => 'api_content'], ];

Release note

No response

Triage and priority

m2-assistant[bot] commented 2 years ago

Hi @adrianbsystems. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 2 years ago

Hi @engcom-Lima. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Lima commented 2 years ago

Hi @adrianbsystems ,

Thank you for reporting and collaboration. Amazon Integration is a 3rd party extension and code of this extension is not part of https://github.com/magento/magento2 git repository. We are closing this issue as community is not able to provide fix for it in this repository. All questions, issue reports and fix for them should be addressed to the corresponding extension owners(support) on the Magento Market place page.

Thank you.