feat(fulfillment): Migration backward compatibility (#6672)

**What**
- Update migration for backward compatibility. This does not take into account data migration and table cleanup (@olivermrbl do we have a general tasks for the modules on that subject)?
- Rename fulfillment provider id to provider id
- add integration tests to ensure the migration backward compatibility
- add new module type for the options to be used in the medusa config for example

FIXES CORE-1724
This commit is contained in:
Adrien de Peretti
2024-03-12 13:53:33 +00:00
committed by GitHub
parent e82b4788ec
commit 87e63c024e
17 changed files with 896 additions and 137 deletions
@@ -1,4 +1,5 @@
const { Modules } = require("@medusajs/modules-sdk")
const { FulfillmentModuleOptions } = require("@medusajs/fulfillment")
const DB_HOST = process.env.DB_HOST
const DB_USERNAME = process.env.DB_USERNAME
const DB_PASSWORD = process.env.DB_PASSWORD
@@ -70,5 +71,20 @@ module.exports = {
[Modules.TAX]: true,
[Modules.CURRENCY]: true,
[Modules.PAYMENT]: true,
[Modules.FULFILLMENT]: {
/** @type {import('@medusajs/fulfillment').FulfillmentModuleOptions} */
options: {
providers: [
{
resolve: "@medusajs/fulfillment-manual",
options: {
config: {
"test-provider": {},
},
},
},
],
},
},
},
}