magento / magento/data-migration-tool

Catalog Search index process unknown error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.store_id' in 'field list', query was: SELECT `u`.* FROM ( (SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_varchar` AS `t`....

Open
#842 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
339
Forks
195
PR merge metrics
No merged PRs in 30d

Description

### Preconditions
1. Migrating from Magento 1.9.4.5
2. Migrating to Magento 2.4.0

### Steps to reproduce
1. Setup clean installation of Magento 2.4.0
2. Run Settings migration as usual
3. Run Data migration as usual
4. Perform reindexing

### Expected result
1. Successfully rebuilt Catalog Search index.

### Actual result
`Catalog Search index process unknown error:`
`SQLSTATE[42S22]: Column not found: 1054 Unknown column 't.store_id' in 'field list', query was: SELECT `u`.* FROM ( (SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_varchar` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('111', '479', '113', '114', '118', '563', '533', '514', '927', '982')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_int` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('119', '940', '941', '937', '117', '120')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_text` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('112', '115', '116', '121', '122', '123', '926', '530')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `catalog_category_entity_varchar` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('965')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_datetime` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('565', '566')) AND (`store_id` IN ('2', 0)))UNION ALL(SELECT `t`.`value`, `t`.`attribute_id`, `t`.`store_id` FROM `customer_entity_decimal` AS `t` WHERE (entity_id = '3') AND (attribute_id IN ('942')) AND (`store_id` IN ('2', 0))) ) AS `u` ORDER BY `store_id` ASC`

### Additional notes
I managed to migrate both Settings and data successfully to a freshly installed magento 2.4.0 project.
My **orders, products, settings** etc .. where successfully migrated ( i am able to see them in backend )
But when i run the command `php bin/magento indexer:reindex` after successful migration, it shows this sql error.

This same sql error is shown when i take the **category menu in backend admin panel.**

I checked in my old magento 1.9.4.5 site, there also `store_id` column is not present in `customer_entity_varchar` table, but everything is working perfectly there.

Tried migrating data again in a freshly installed magento 2.4.0 agian, but no luck.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the migration and running `php bin/magento indexer:reindex`, then check the reported queries against the customer EAV tables and their schema. Compare the migrated and clean Magento 2.4.0 schemas, including the category-admin path. Done means catalog search reindexing and the category menu complete without the missing `store_id` error.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.