Migrations & Upgrades
Overview
This release contains a migration to ensure that the product_variant_inventory
table is in its correct state. We mistakenly modified a column name in an already released migration, which naturally can lead to issues if the first migration has already been applied.
The issue was reported in #3379.
Actions Required
After updating your Medusa server and before running it, run the following command to run the latest migrations:
medusa migrations run
Features
Global event options
This release contains an improvement of the events system in Medusa. Until now, the core EventBusService.emit
calls have been closed for configuration. This changes in this release with the introduction of an option event_options
, which is configurable in your project config in medusa-config.js
.
Example:
module.exports = {
projectConfig: {
redis_url: REDIS_URL,
database_url: DATABASE_URL,
database_type: "postgres",
store_cors: STORE_CORS,
admin_cors: ADMIN_CORS,
event_options: {
removeOnComplete: 5
}
},
plugins,
};
The available option is in Bull's documentation.
The attempts
option on core emit calls is currently still fixed to 1
.
Important: options passed in this config will be applied globally to all EventBusService.emit
calls. You can still overwrite these options in your custom emit calls as they take precedence over the global options.
- feat(medusa): Add global job options for events (#3394) @olivermrbl
Bugs
- fix(medusa): Remove default job age option from EventBus (#3388) @olivermrbl
- fix(medusa): Create migration to ensure correct variant inventory column (#3384) @pKorsholm