-
Notifications
You must be signed in to change notification settings - Fork 119
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
Add SQL upgrade queries for new unit price column #441
Conversation
@jolelievre rebase needed 👍 |
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.
To be rebased after merge of the related PR from core
a14caf6
to
dcbb2cd
Compare
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.
PR has been rebased
Hello, This PR cannot be tested now. It is blocked by the autoupgrade issue #26503 since the PR related is on develop branch. It will be tested as soon as the issue will be fixed. Thanks, |
Hi @jolelievre, @marwachelly, As discussed with @atomiix while testing the blocked PR Thank you! |
Hello @jolelievre , Could you please check the conflicted files? Thanks, |
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.
@jolelievre Could you rebase your PR ?
dcbb2cd
to
8252e10
Compare
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 @jolelievre,
I followed these steps:
- Install PS1786 with English language & France country
- Uninstall some incompatible modules
- Install the upgrade module from this PR
- Upgrade to 8.0.x
- After the upgrade, I'm blocked, I cannot test the product V2 because it is hidden
Untitled_.Jun.14.2022.10_54.AM.mp4
We should wait for this PR: #489 to be merged
Thanks!
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.
8252e10
to
2ae16e5
Compare
Thanks @khouloudbelguith the branch is rebased no content was modified only addressed the conflict because a PR that modified the same place was merged. It should be testable even if I'm waiting for a re-approval |
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.
Hi @jolelievre,
It is ok ✔️
-
I checked an upgrade from PS1778 to 8.0.x
-
A rollback from 8.0.x to PS1778
-
I checked an upgrade from PS1786 to 8.0.x
-
A rollback from 8.0.x to PS1786
Untitled_.Jul.4.2022.2_56.PM.mp4
I tried:
- BO > Add new order / view order / edit order
- BO > View & delete shopping Cart
- BO > Add/Edit a product V1/V2 (multistore enabled / disabled)
- BO > View customer
- BO > Email theme > Http of order_conf
- FO > Create order
- FO > Sign in / create an account
Thanks!
Thanks @jolelievre! |
Add SQL upgrade queries for new unit price column
In 178 the product table used the
unit_price_ratio
to save the unit price, so the actual value was not saved only the ratio instead. In 8.0.0 we now have aunit_price
column which persists the actual value specified in the BO and used in the FO. But we kept theunit_price_ratio
for backward compatibility for now.This upgrade PR does to things:
- it adds the new column
unit_price
in the database- it computes its value based on existing
unit_price_ratio
andprice
columnunit_price
column has been created in theproduct
table andproduct_shop
table, theunit_price
values should be prefilled based on previous values. The formula to compute it is the followingunit_price = price / unit_price_ratio
, when you go back to the product edition the value for the unit price should be the same even if it is now based on a different column.