-
Notifications
You must be signed in to change notification settings - Fork 9.4k
field lengths differ across many tables #10868
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
Conversation
I found numerous field lengths to be different across many tables. Thus strings get cut off. In my case the "telephone" was cut off as someone set it to be just 20 characters in the quote_address table despite it being 255 characters wide in the sales_order_address table. There are many other fields differing. Someone seriously needs to check this! Unfortunately I do not have enough knowledge about all the fields. In my case our customers want to enter not one phone number but sometimes their landline and mobile phone number into the telephone field. The field is not validated against any format.
Well,
This seems really wrong but I'm not sure we can change this to some reasonable value, like
Not a valid scenario.
Please describe concrete issues with concrete observations which does not seem to be valid. |
@orlangur well sure a phone is max 20 chars at least according to https://en.wikipedia.org/wiki/Telephone_numbering_plan Also there are other fields that differ like shipping_method, firstname, lastname, prefix, suffix and so on. Some of those are even updated in the UpgradeSchema script. |
@steros trying to understand the reason of Looks like column size was mixed up with column position, isn't it? |
Thanks for finding that commit! That could be an option. Those numbers seem very arbitrary. Why would "country_id" be changed to 40 chars? As far as I can see "country_id" seems to be something along ISO 639 or similar. So that could be 2 to 4 characters wide possibly. @mlogvin Can you comment on that? |
Note the commit message |
Ok, I managed to reach Michael on this, suspicious commit was performed in scope of NDB compatibility efforts. It is not clear whether column sizes were picked up to make it work or mixed up with column positions. Also, I noticed https://github.com/magento/magento2/pull/10011/files which is about firstname/middlename/lastname truncation. @steros please go all over cb3914b and fix all numbers not fixed yet which seem unreasonable (for example, I don't think Note that changes should be made similar to PR I mentioned, please rewrite this branch with force push having single commit so that only |
I'm not sure if I have enough knowledge to go over all fields and decide the correct field length. |
@steros feel free to just fix the |
@steros do you need any assistance with rewriting PR as an upgrade script? |
@orlangur I would only need an advice what version to target. Cause as I see it the fix actually targets all versions but you need to set a specific one don't you? Other than that I'm fine but I can't work on it before November. So if anyone wants to pick it up to fix it earlier, I'm fine with it. |
@steros thanks for quick response! Let's close this PR for now then. I reopened initial bug report with instruction how the fix should be done and added to Community Dashboard so that it can be picked up by anyone.
|
If no one fixes it until November I'll pick it up, thanks 👍 |
Description
I found numerous field lengths to be different across many tables. Thus strings get cut off.
In my case the "telephone" was cut off as someone set it to be just 20 characters in the quote_address table despite it being 255 characters wide in the sales_order_address table.
There are many other fields differing.
Someone seriously needs to check this! Unfortunately I do not have enough knowledge about all the fields.
In my case our customers want to enter not one phone number but sometimes their landline and mobile phone number into the telephone field. The field is not validated against any format.
Fixed Issues (if relevant)
Manual testing scenarios