Description
Steps to reproduce (*)
One way to reproduce this is noted here: https://www.schmengler-se.de/en/2016/12/column-not-found-1054-unknown-column-sales_bestsellers_aggregated_yearly-product_type_id-in-field-list/
where a fresh 1.9.3 with sample data was installed
Expected result (*)
The Field should be added during install (or update) as part of
https://github.com/OpenMage/magento-lts/blob/v19.4.6/app/code/core/Mage/Sales/sql/sales_setup/upgrade-1.6.0.9-1.6.0.10.php
Actual result (*)
In some cases it is missing, and then popping up as part of a migration to OpenMage (just happened)
Seems to usually also happen on normal magento updates/migrations with 1.9.3 or higher, which makes sense, as the upgrade script was added with 1.9.3.0
other related mentions:
- https://magento.stackexchange.com/questions/141291/error-on-login-after-update-to-1-9-3
- https://community.magento.com/t5/German/Fehler-nach-Update-von-1-9-2-4-auf-1-9-3-0/td-p/51169
- https://community.magento.com/t5/Magento-1-x-Version-Upgrades/Unknown-column-catalog-product-entity-group-price-is-percent/td-p/53634
I think a possible solution would be, to add another update script, which checks and adds it if missing.
But maybe someone has more time and can look into the details why this is happening, maybe its a leftover of the sample data.
Or there is an edgecase or combination of modules, so this does not run correctly.