Open
Description
Summary (*)
Cannot set a foreign constraint onDelete="RESTRICT" in custom table.
Examples (*)
<constraint xsi:type="foreign"
referenceId="CUSTOM_TABLE_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID"
table="custom_table"
column="customer_id"
referenceTable="customer_entity"
referenceColumn="entity_id"
onDelete="RESTRICT"/>
Proposed solution
Add "RESTRICT" value to foreign constraint referenceOptionsType.
Metadata
Metadata
Assignees
Labels
Issue recommended for the contribution dayGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchMajor restrictions or short-term circumventions are required until a fix is available.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Activity
m2-assistant commentedon Feb 28, 2020
Hi @textarea. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
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 releaseFor more details, please, review the Magento Contributor Assistant documentation.
@textarea do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
m2-assistant commentedon Feb 28, 2020
Hi @dmytro-ch. 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: 👇
1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears.2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself.3. Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.4. 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 on
2.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!
5. Add label
Issue: Confirmed
once verification is complete.6. Make sure that automatic system confirms that report has been added to the backlog.
magento-engcom-team commentedon Feb 28, 2020
✅ Confirmed by @dmytro-ch
Thank you for verifying the issue. Based on the provided information internal tickets
MC-31998
were createdIssue Available: @dmytro-ch, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
6 remaining items
speller commentedon Apr 25, 2024
Any updates on this issue?
speller commentedon Apr 25, 2024
That's funny how a one-line fix ticket is not being solved for 4 years. Just add the
<xs:enumeration value="RESTRICT" />
line to theSetup/Declaration/Schema/etc/constraints/foreign.xsd
file and that's it.thecodecook14 commentedon Feb 26, 2025
@magento I am working on this