Skip to content
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 upgrade inconsistencies #631

Merged
merged 1 commit into from Sep 19, 2023
Merged

Conversation

Hlavtox
Copy link
Contributor

@Hlavtox Hlavtox commented Sep 13, 2023

Questions Answers
Description? Fixes some database incosistencies on upgraded installs found in PrestaShop/PrestaShop#33483. The differences do not necessarily mean something doesn't work, but removes the chance of biting us back with it. I fixed the things for both the original upgrade scripts AND 8.1.2, so we fix users that already upgraded.
Type? bug fix
BC breaks? no
Deprecations? no
Fixed ticket? Fixes PrestaShop/PrestaShop#33975
Sponsor company
How to test? Tests green + run the queries in 8.1.2.sql manually. Make sure to put SET SESSION sql_mode=''; to the beginning, or you will get an error 1067 because of bad default value in PREFIX_smarty_lazy_cache.

Copy link
Member

@boherm boherm left a comment

Choose a reason for hiding this comment

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

Looks good to me @Hlavtox, but can you resolve conflits? 😄

boherm
boherm previously approved these changes Sep 14, 2023
@M0rgan01 M0rgan01 added this to the 4.16.4 milestone Sep 14, 2023
@M0rgan01 M0rgan01 mentioned this pull request Sep 14, 2023
boherm
boherm previously approved these changes Sep 14, 2023
LouisAUTHIE
LouisAUTHIE previously approved these changes Sep 14, 2023
M0rgan01
M0rgan01 previously approved these changes Sep 14, 2023
Copy link

@aniszr aniszr left a comment

Choose a reason for hiding this comment

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

Hello @Hlavtox

I tested your PR, and I didn't manage to verify all improvements you mentioned in description!

See detailed results obtained in Database after upgrade from 17.6.7 -> 8.1.2 :

  • ps_product_attribute location is not removed after upgrade ❌
    ps_product_attribute quantity is not removed after upgrade ❌

    See attached screenshot:

image

  • ps_smarty_lazy_cache cache_id is similar to 8.1.2 clean version ✔️

  • ps_log : id_shop id_shop_group id_lang is similar to 8.1.2 clean version ✔️

  • ps_product_attribute_lang : available_now , available_later is similar to 8.1.2 clean version ✔️

  • ps_order_cart_rule : deleted is similar to 8.1.2 clean version ✔️

  • ps_product_group_reduction_cache : reduction is similar to 8.1.2 clean version ✔️

  • ps_stock_mvt : physical_quantity is similar to 8.1.2 clean version ✔️

  • ps_order_payment : amount is similar to 8.1.2 clean version ✔️

Thank you !

@MatShir
Copy link

MatShir commented Sep 18, 2023

FYI it won't be part of 4.16.4. But, no worries, it will be part of the next patch with this coming fix PrestaShop/PrestaShop#33874 ;)

@MatShir MatShir removed this from the 4.16.4 milestone Sep 18, 2023
Copy link

@aniszr aniszr left a comment

Choose a reason for hiding this comment

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

Hello @Hlavtox

I retested your PR after your last improvement and it LGTM ✔️

The problem mentioned previousely in ps_product_attribute table is solved ✔️ :

  • ps_product_attribute location is removed after upgrade ✔️

  • ps_product_attribute quantity is removed after upgrade ✔️

See attached screenshot:

image

Thanks!

@aniszr aniszr self-assigned this Sep 19, 2023
@nicosomb nicosomb modified the milestone: 4.16.4 Sep 19, 2023
@M0rgan01 M0rgan01 added this to the 4.16.5 milestone Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
8 participants