Skip to content

Missing unique key on eav attribute label table #30981

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

Open
wants to merge 11 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

alex311982
Copy link

@alex311982 alex311982 commented Nov 19, 2020

Description (*)
The table eav_attribute_label should contain a unique key constraint on the (store_id, attribute_id) pair.
This PR add it. Fixes #24581

Contribution checklist (*)
Pull request has a meaningful description of its purpose
All commits are accompanied by meaningful commit messages
All new or changed code is covered with unit/integration tests (if applicable)
All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Nov 19, 2020

Hi @alex311982. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

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

⚠️ According to the Magento Contribution requirements, all Pull Requests 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 Pull Requests 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

@alex311982
Copy link
Author

@magento run Functional Tests B2B

@alex311982
Copy link
Author

@magento run Functional Tests EE

@ihor-sviziev
Copy link
Contributor

Hi @alex311982,
I believe you're trying to fix the #24581?
If so - could you add to description following text:
Fixes #24581 ?

@ihor-sviziev ihor-sviziev self-assigned this Nov 19, 2020
@ihor-sviziev
Copy link
Contributor

@magento run all tests

@ihor-sviziev ihor-sviziev added Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix labels Nov 19, 2020
@alex311982
Copy link
Author

@ihor-sviziev The description is updated.

@ihor-sviziev ihor-sviziev added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Nov 19, 2020
@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Nov 19, 2020

Just copied priority and severity labels from issue.

The changes looks good to me, but let's wait for test results

@ihor-sviziev
Copy link
Contributor

@magento run all tests

1 similar comment
@alex311982
Copy link
Author

@magento run all tests

@@ -486,6 +486,10 @@
referenceColumn="attribute_id" onDelete="CASCADE"/>
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_LABEL_STORE_ID_STORE_STORE_ID" table="eav_attribute_label"
column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_STORE_ID_UNIQUE">
Copy link
Contributor

@ihor-sviziev ihor-sviziev Nov 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the name should be, as you have different soring of the columns, also "_UNIQUE" suffix isn't really needed here

Suggested change
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_LABEL_ATTRIBUTE_ID_STORE_ID_UNIQUE">
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_LABEL_STORE_ID_ATTRIBUTE_ID">

@@ -390,4 +392,4 @@
"EAV_FORM_ELEMENT_TYPE_ID_ATTRIBUTE_ID": true
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add empty line to the file, as it was before

@engcom-Alfa
Copy link
Contributor

We have a couple of auto-test jobs being failed after many tried. Hence moving the PR ticket to Extended Testing.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests EE, Semantic Version Checker

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE, Semantic Version Checker, Functional Tests CE

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests EE, Functional Tests CE, Functional Tests B2B, Semantic Version Checker

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Semantic Version Checker

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests CE, Semantic Version Checker

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@engcom-Charlie
Copy link
Contributor

Created Approval Jira ticket for the SVC test failure. Waiting for the approvals.

Moving it to Pending Approval now.

Thank you!

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Oct 21, 2022

Created new Approval Jira ticket on adobe portal for the SVC test failure. Waiting for the approvals.

Thank you!

@engcom-Charlie
Copy link
Contributor

@magento run Semantic Version Checker

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@engcom-Charlie any updates on this?

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@ihor-sviziev we are waiting for the approvals, once that is done, will proceed with this PR and keep updated here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix Component: Catalog Component: Eav Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending approval QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Risk: low Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Status: Pending Approval
Development

Successfully merging this pull request may close these issues.

MIssing unique key on eav_attribute_label table
9 participants