Solution
Just toggle your indexer mode from schedule
to realtime
and then back to schedule
. You can use the Magento Admin (System->Index Management) or the command line tool thus:
bin/magento indexer:set-mode realtime
bin/magento indexer:set-mode schedule
As described in the Magento2 documentation.
What's occurring?
The error is due to some tables eg catalog_product_entity_int
having triggers on them so that the scheduled indexer knows what to index. The module CatalogStaging (or one of its dependencies) changes a column name in the table from entity_id
to row_id
but the trigger does not get updated so it still refers to NEW.entity_id
when the entity_id
column no longer exists.
The triggers are created when the index mode is set to scheduled
so this situation may affect any DB of a Magento install that has been set to index on schedule before upgrading to 2.1.
The fix is simple but not obvious : toggle the indexer to realtime
(update on save) and then put it back to schedule
. This clears the triggers and then recreates them with the correct reference to the updated column name: NEW.row_id
in the trigger as now required by the Magento_CatalogStaging module