Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to re install missing foreign-key constraints? #32289

Closed
1 of 5 tasks
Eddcapone opened this issue Feb 25, 2021 · 5 comments
Closed
1 of 5 tasks

How to re install missing foreign-key constraints? #32289

Eddcapone opened this issue Feb 25, 2021 · 5 comments
Labels
Issue: ready for confirmation stale issue Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@Eddcapone
Copy link

Eddcapone commented Feb 25, 2021

Summary (*)

I am using a third party extension.
I noticed that a constraint is missing by comparing with a fresh installation. This causes a bug when deleting an item of the extension.

Is there a command which is able to install missing constraints?

I've tried

php -f bin/magento setup:db-schema:upgrade
php -f bin/magento setup:db-data:upgrade
php -f bin/magento setup:upgrade

but none of these commands re-installed the missing constraint.


The only way I've found is deleting the table and the extension entry from the table setup_module and executing php bin/magento setup:upgrade, but this is too radical since I have to re-add the data

Examples (*)

If you like to reproduce it, then just delete a random Foreign Key Constraint, then try to execute

php -f bin/magento setup:db-schema:upgrade
php -f bin/magento setup:db-data:upgrade
php -f bin/magento setup:upgrade

and see if the constraint was added again.

Proposed solution


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users with no 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”.
@Eddcapone Eddcapone added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Feb 25, 2021
@m2-assistant
Copy link

m2-assistant bot commented Feb 25, 2021

Hi @Eddcapone. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 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, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@Eddcapone Eddcapone changed the title How to re install missing constraints? How to re install missing foreign-key constraints? Feb 25, 2021
@mrtuvn
Copy link
Contributor

mrtuvn commented Feb 26, 2021

Maybe problem related with this solution #32286

@hostep
Copy link
Contributor

hostep commented Feb 26, 2021

Nope, that's something completely different :)

@Eddcapone, you'll need to provide some more details and actually github isn't really the correct place to discuss these sort of things, you'll probably want to try https://magento.stackexchange.com/
Issues on github should have very clear steps about how we can reproduce these before we can consider this a bug in Magento itself. If this is a problem caused by some 3rd party plugin, then github is not really the right place to start this discussion.

@Eddcapone
Copy link
Author

Eddcapone commented Feb 26, 2021

@hostep , This is not a bug report. I created the issue under Developer Experience Issue.

image

I did not added steps since I thought it is self explanatory. To reproduce you just have to delete a random constraint and then try to look for a command which is able to install it again.

I also posted it under magento.stackexchange already:
https://magento.stackexchange.com/questions/331747/magento-2-how-to-re-install-missing-foreign-key-constraints/331748#331748

@stale
Copy link

stale bot commented May 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Is this issue still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? Thank you for your contributions!

@stale stale bot added the stale issue label May 13, 2021
@stale stale bot closed this as completed May 27, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: ready for confirmation stale issue Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

No branches or pull requests

3 participants