Skip to content

fix for #38585: Signed primary columns changed value #38920

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 10 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

KrasnoshchokBohdan
Copy link
Contributor

Description (*)

changed "unsigned" attribute for "value_id" column for tables from original list (This is applicable to the following tables:... from author post) + catalog_category_entity_datetime, customer_address_entity_datetime

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Database tables with primary column having signed instead of unsigned definition which is loss of usable values #38585

Manual testing scenarios (*)

  1. mysql -u root -p
  2. use (your magento2 db name)
  3. desc catalog_product_entity_text (or any table from the list)
  4. check "value_id" type, should be unsigned
image

Questions or comments

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

…ead of unsigned definition which is loss of usable values

- changed unsigned attribute for value_id column for tables from original list + catalog_category_entity_datetime customer_address_entity_datetime
Copy link

m2-assistant bot commented Jul 12, 2024

Hi @KrasnoshchokBohdan. Thank you for your contribution!
Here are some useful tips on 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
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added the Priority: P3 May be fixed according to the position in the backlog. label Jul 12, 2024
@m2-github-services m2-github-services added Partner: Perspective Team partners-contribution Pull Request is created by Magento Partner labels Jul 12, 2024
@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run all tests

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Functional Tests B2B Functional Tests CE Functional Tests EE

Copy link

Failed to run the builds. Please try to re-run them later.

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Functional Tests B2B

1 similar comment
@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Functional Tests B2B

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Functional Tests CE

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Functional Tests EE

@KrasnoshchokBohdan
Copy link
Contributor Author

Failed tests seems flaky to me

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@engcom-Hotel
Copy link
Contributor

We are moving this PR On Hold as some internal discussion is going on related to it.

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Unit Tests Static Tests WebAPI Tests

Copy link

Failed to run the builds. Please try to re-run them later.

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Unit Tests

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run WebAPI Tests

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Magento Health Index

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Static Tests Semantic Version Checker

Copy link

Failed to run the builds. Please try to re-run them later.

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Static Tests, Semantic Version Checker

@KrasnoshchokBohdan
Copy link
Contributor Author

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE

@KrasnoshchokBohdan
Copy link
Contributor Author

@ihor-sviziev @engcom-Charlie

Hi! Now it seems to look better, what do you think?

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Sep 19, 2024

@ihor-sviziev @engcom-Charlie

Hi! Now it seems to look better, what do you think?

Hi @KrasnoshchokBohdan,

Thank you for the updation!

@ihor-sviziev, as suggessted by you in here also in other comments like here, it seems that @KrasnoshchokBohdan have made the changes accordingly.

Requesting you for the review.

Thank you!

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

@KrasnoshchokBohdan, I just reviewed this PR again, and see that by adjusting type of the columns we were getting issues like this:

  Column definition "product_tax_class_id" and reference column definition "c
  lass_id" are different in tables "tax_calculation" and "tax_class"
  Column definition "customer_tax_class_id" and reference column definition "
  class_id" are different in tables "tax_calculation" and "tax_class"
  Column definition "tax_calculation_rate_id" and reference column definition
   "tax_calculation_rate_id" are different in tables "tax_calculation" and "t
  ax_calculation_rate"
  Column definition "tax_calculation_rule_id" and reference column definition
   "tax_calculation_rule_id" are different in tables "tax_calculation" and "t
  ax_calculation_rule"
  Column definition "tax_calculation_rate_id" and reference column definition
   "tax_calculation_rate_id" are different in tables "tax_calculation_rate_ti
  tle" and "tax_calculation_rate"


You've reverted these changes, which is great, thanks!

I am wondering if people might have similar issues with other tables that you've changed just because they have foreign keys to these tables in custom extensions, and Magento doesn't have those custom extensions.

I believe the number of potentially affected people will be higher than the number of people getting to the issue you're trying to resolve. Those who need it can apply these changes as a patch and verify that they do not affect their Magento installation.

Having that in mind, I don't know if we should accept this pull request.
Please give us your thoughts on this.

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@rostilos
Copy link
Contributor

rostilos commented Sep 27, 2024

@ihor-sviziev
Perhaps to maintain compatibility there is an option to create a datapatch instead of directly modifying the schema DB?
I'm not sure that's possible using the M2 framework toolkit, but maybe you can give me more hints.

@ihor-sviziev
Copy link
Contributor

@rostilos, unfortunately it won’t help because of dependencies in 3rt party extensions. These extensions still will have a db schema files, which declare the current state. I don’t think it’s possible to make backward compatible version at all, while benefit from this change will be for pretty small amount for installations

@engcom-Charlie
Copy link
Contributor

Hi @engcom-Hotel,

Can you please go through @ihor-sviziev's comment and review this PR again to decide whether we can proceed ahead with this PR or not.

Thank you!

@engcom-Hotel
Copy link
Contributor

Hello @KrasnoshchokBohdan,

I agree with @ihor-sviziev's input here. This PR may impact some third-party extension that uses these tables as foreign keys.

I think we can close this PR.

Please suggest @KrasnoshchokBohdan @rostilos @ihor-sviziev.

Thanks

@engcom-Hotel
Copy link
Contributor

We are closing this PR as the fix may impact the 3rd party extensions.

@hostep
Copy link
Contributor

hostep commented Oct 10, 2024

I heard some whispers a few months ago about a potential upcoming Magento 2.5.0 version, so maybe if that actually happens, we can open this PR again, because it's a new major version where backwards compatibility breaking is allowed

@rostilos
Copy link
Contributor

@engcom-Hotel
Perhaps, given the post above, we can reopen it and assign an appropriate label?

@ihor-sviziev
Copy link
Contributor

I don't mind re-opening it for 2.5, but I didn't hear any news about it

@ihor-sviziev ihor-sviziev reopened this Oct 19, 2024
Copy link

m2-assistant bot commented Oct 19, 2024

Hi @KrasnoshchokBohdan. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ 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
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@Priyakshic
Copy link
Collaborator

Hi @KrasnoshchokBohdan ,

Thanks for the contribution!
Currently, we are not processing the PRs targeted for 2.5-develop. Therefore, we are removing the "Community Picked" label for this PR.
We will revisit and pick this PR in the future whenever we start working on 2.5-develop.

Thanks

@Priyakshic Priyakshic removed the Project: Community Picked PRs upvoted by the community label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Perspective Team partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: needs update Release Line: 2.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Database tables with primary column having signed instead of unsigned definition which is loss of usable values