Magento 2 : After Data Migration(Indexer issue)
-
07-01-2021 - |
Solution
As stated in the comments, most probably you imported some tier prices for at least a product for a website that does not exist.
To fix this you have to identify the rows in the table catalog_product_entity_tier_price
that have in the column website_id
a value that is not present in the table store_website
.
A rough query could be
SELECT
*
FROM
catalog_product_entity_tier_price tier
WHERE
website_id NOT IN (
SELECT website_id FROM store_website
)
I'm sure this is not optimized but it should work.
To delete the rows if any just change in the query above SELECT *
with DELETE
.
This is not tested and I might be wrong so please backup your db first.
If there are rows and you delete them, try reindexing again.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange