Version 1.12.0 of Medusa comes with database changes that require you run the migrations command and a minor breaking change to the
This release contains migrations that introduce a range of new database indexes that will improve performance of your setup.
Additionally, it brings minor breaking changes to the
PriceSelectionStrategy. The method
calculateVariantPrice now supports bulk calculating variant prices.
Specifically, the following signature has changed:
Finally, a clean up of our
@medusajs/utils have also led to potential breaking changes. The clean-up resulted in the following:
class-transformerhave been removed from
TransactionBaseServicehas been removed from
@medusajs/utils. This class should be imported from
soft-deletable-entityhave been removed from
@medusajs/medusa. These should be imported from @medusajs/medusa.
How to Update
Run the following command in the root directory of your Medusa Backend:
To avoid unexpected issues with dependencies, it is also recommended to update all other Medusa plugins or packages you have installed.
After updating your Medusa server and before running it, run the following command to run the latest migrations:
Change PriceSelectionStrategy method
If you've created a custom price selection strategy, or have using the
calculateVariantPrice method in your custom code, make sure to update its definition or usage based on the new signature:
You can learn more in the Price Selection Strategy documentation.