-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix deprecated CHARSET utf8 in install and upgrade #144
Conversation
install.sql in root directory of module prior v5.0.1 CREATE TABLE with deprecated CHARSET=utf8. It need to be fixed in the upgrade of next version.
We are on v5.0.2 now.
Hey @leemyongpakvn 👋 PHP-CS-Fixer is probably not happy with an indentation you have in your upgrade file |
@kpodemski PHP-CS-Fixer v2 complains about 1 redundant space. I have no problem with PHP-CS-Fixer v3 on my localhost 😋 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @leemyongpakvn ,
I have an issue, I have installed version 5.0.0 of productcomments module.
But I don't have the upgrade to v5.0.3 available, only v5.0.2:
Could you check ?
Thanks!
@florine2623 I think it's because you need to bump the version of the module in |
You must create version 5.0.3. Say me if you need help |
Ha ! @kpodemski again too fast |
@kpodemski @okom3pom I though it would be automatic ! Can one of you guy show me how to do it ? I changed it in productcomments.php line 48 |
Here you have two things to test: The update and the installation. You have to check that the tables will be in utf8mb4 Yes, you have to change the version at this line |
Here's what I did:
Am I missing something ? |
@kpodemski & @okom3pom According to modules/creation/enabling-auto-update, the upgrade filename must be upgrade-5.0.3.php. Upgraded successfully on PS 1.7.8.5 but failed on PS 8.0.0 with filename |
@florine2623 |
I'll ping @atomiix as it seems that it might be related to the Distribution API Client |
QA, the workaround is to disable Ensure that module tables are all with a new encoding after upgrading to 5.0.3. Remember about changing 5.0.2 to 5.0.3 in |
@kpodemski Nearly perfect. 👍 When run directly in phpMyAdmin: my code only upgrade table collation, your code upgrade both table and its fields collation. The remaining issue is Upgrade via BO interface does not call install-**5.0.3**.php. BO upgrade suggest upgrade v5.0.2 -> v5.0.2, and I guess it called install-**5.0.2**.php instead :( Co-authored-by: Krystian Podemski <[email protected]>
@kpodemski Although |
I think there is a corner case: User have old version installed and then uninstalls it keeping the tables. I think that migration script is not executed so, that user will still having I think that we should check if tables exists on install. Wow, this is a bigger problem, if the user decides to keep the old version tables, the columns might be different in a new version. |
@davidglezz I see parameter
not keep the module's tables. |
We are on v6.0.2 now
I installed PrestaShop Here is the I deleted the
I checked the other tables, it's OK too. |
Thanks @kpodemski and @nicosomb |
It is a bit surprised that |
5.0.16.0.0 version CREATE TABLE with deprecated CHARSET=utf8. It need to be updated to utf8mb4 in install and upgrade process of the next version.