1

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.

1 Answer 1

3

Please try to update the indexer from schedule to real-time & then again back to schedule.

Use these commands -

bin/magento indexer:set-mode realtime

bin/magento indexer:set-mode schedule

Please try and let me know if this work

Thanks, Rashi

5
  • 1
    Thank you for your response, I have tried that as well but it didn't work. Also, I have updated the question. It was a mistake on my side, I was trying to upgrade from 2.4.1(Enterprise) to 2.4.3(community) now it's fixed.
    – Mohit Rane
    Dec 2, 2021 at 9:20
  • Oh, then that was obvious. Great Dec 3, 2021 at 6:34
  • 1
    yeah, but I didn't know that version was enterprise so that's my bad. Thank you for your answer though ;)
    – Mohit Rane
    Dec 3, 2021 at 6:57
  • Welcome. Please vote if you find it as feasible solution Dec 3, 2021 at 7:03
  • 1
    Worked, you saved my day. Nov 14, 2022 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.