"bin/magento setup:upgrade" error when upgrading database schema
yavery opened this issue · 8 comments
Preconditions and environment
- Magento version: 2.4.5 (upgrading 2.4.2 database schema)
Then running bin/magento setup:upgrade
The first run will error out, but immeidately run the same command the second time, it will run through without any error
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_id' in 'NEW', query was: CREATE TRIGGER trg_catalog_category_entity_int_after_insert AFTER INSERT ON catalog_category_entity_int FOR EACH ROW
BEGIN
INSERT IGNORE INTO `catalog_category_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END
Steps to reproduce
- a project with 2.4.2 database
- php is upgraded to 8.1
- updated the project to 2.4.5, assume eliminated all errors at the php code level
- bin/magento setup:upgrade
Expected result
first run should succeed
Actual result
first run fails, second run succeeds
Additional information
No response
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @yavery. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this
- To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇
-
- Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
-
- Verify that issue has a meaningful description and provides enough information to reproduce the issue.
-
- Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.
- Add
-
- Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
- Verify that the issue is reproducible on
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi @yavery ,
Verified the issue in 2.4.2 instance and the issue is not reproducible
Kindly refer the below screenshots:
Steps to reproduce:
1.Install 2.4.2 magento instance
2.upgrade to instance to 2.4.5
3.run setup upgrade command with PHP 8.1
Setup upgrade command ran successfully without any issues on first attempt.
Thanks!
Hi @yavery ,
Do you Need further investigation regarding this issue,Still we are waiting for your response, If you are providing any information about this issue it really helps us.
Thanks.
I get this error when moving from Commerce to Open Source. Maybe you did that by accident?
Our upgrading is from commerce 242 to commerce 245 (245-p3)
"magento/product-enterprise-edition": "2.4.5-p3"
Hi @yavery ,
Verified the issue in adobe commerce 2.4.2 and the issue is not reproducible, We can successfully upgrade the commerce version 2.4.2 to 2.4.5-p3 without any interruptions. Kindly refer the below screenshot:
Thanks!
Hi @yavery ,
We have noticed that this issue has not been updated since long time. Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.
Thanks.