I'm getting this error after upgrading from 2.4.1 to 2.4.3p1. I'm running setup:upgrade command it's showing me below error.
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id' in 'NEW', query was: CREATE TRIGGER trg_catalog_product_entity_int_after_insert AFTER INSERT ON catalog_product_entity_int FOR EACH ROW
BEGIN
INSERT IGNORE INTO `catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `catalogsearch_fulltext_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END
I tried this solution How to fix Magento2 MySQL error message ERROR 1054: 1054: Unknown column 'entity_id' in 'NEW'
It's the same error as in the upgrade command, check screenshot:-https://nimb.ws/82nV45
Update
It was a mistake from a fellow colleague, I was told to resolve the errors of the upgraded setup. When the second time I tried to upgrade I didn't check the version before upgrading so basically I was trying to upgrade from 2.4.1(Enterprise) to 2.4.3(community)
so Now I have upgraded to 2.4.3(Enterprise) and the issue wasn't seen while running upgrade commands.
Hope it helps.