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

Some columns are wrongly upgraded and have different types on upgraded installs #33975

Closed
Hlavtox opened this issue Sep 19, 2023 · 0 comments · Fixed by PrestaShop/autoupgrade#631
Labels
Autoupgrade Module: autoupgrade Bug Type: Bug Fixed Resolution: issue closed because fixed Verified The issue has been reproduced

Comments

@Hlavtox
Copy link
Contributor

Hlavtox commented Sep 19, 2023

Describe the bug and add attachments

There are database difference between cleanly installed 8.1.0 and upgraded from 1.7.6.

TABLE COLUMN CLEAN UPGRADED Note
ps_product_attribute location MISSING PRESENT Caused by #26682, remove the data from database. SQL doesnt have reliable DELETE IF EXISTS, we will do it with PHP script.
ps_product_attribute quantity MISSING PRESENT Caused by #26682, remove the data from database. SQL doesnt have reliable DELETE IF EXISTS, we will do it with PHP script.
ps_smarty_lazy_cache cache_id DEFAULT '' No default value DEFAULT '' must be added during upgrade.
ps_log id_shop unsigned - unsigned must be added during upgrade.
ps_log id_shop_group unsigned - unsigned must be added during upgrade.
ps_log id_lang unsigned - unsigned must be added during upgrade.
ps_product_attribute_lang available_now DEFAULT NULL NOT NULL DEFAULT '' Should not add default value during upgrade.
ps_product_attribute_lang available_later DEFAULT NULL NOT NULL DEFAULT '' Should not add default value during upgrade.
ps_order_cart_rule deleted DEFAULT 0 - Must add DEFAULT 0 during upgrade.
ps_product_group_reduction_cache reduction DEFAULT 0.000000 Should not add default value during upgrade.
ps_stock_mvt physical_quantity int(10) int(11) Autoupgrade script changing it to INT(11) in 8.1.0, but doctrine creates the table with int(10).
ps_group_reduction reduction NO DEFAULT DEFAULT 0.0000 Autoupgrade should not add default value.
ps_order_payment amount DEFAULT 0.000000 Autoupgrade should not add default value.

Expected behavior

Column types must be the same. Issue is fixed by this PR PrestaShop/autoupgrade#631.

PrestaShop version(s) where the bug happened

When upgrading from 1.7.6.0 to 8.1.0

@Hlavtox Hlavtox added Bug Type: Bug New New issue not yet processed by QA labels Sep 19, 2023
@Hlavtox Hlavtox added Autoupgrade Module: autoupgrade Fixed Resolution: issue closed because fixed Verified The issue has been reproduced and removed New New issue not yet processed by QA labels Sep 19, 2023
@Hlavtox Hlavtox closed this as completed Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Autoupgrade Module: autoupgrade Bug Type: Bug Fixed Resolution: issue closed because fixed Verified The issue has been reproduced
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant