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
@@ -37,7 +37,7 @@ export async function createFullDataStructure(
const shippingOption = await service.createShippingOptions(
generateCreateShippingOptionsData({
fulfillment_provider_id: providerId,
provider_id: providerId,
service_zone_id: serviceZone.id,
shipping_profile_id: shippingProfile.id,
})
@@ -4,7 +4,7 @@ export function generateCreateShippingOptionsData({
name,
service_zone_id,
shipping_profile_id,
fulfillment_provider_id,
provider_id,
price_type,
rules,
type,
@@ -19,7 +19,7 @@ export function generateCreateShippingOptionsData({
return {
service_zone_id: service_zone_id,
shipping_profile_id: shipping_profile_id,
fulfillment_provider_id: fulfillment_provider_id,
provider_id: provider_id,
type: type ?? {
code: "test-type_" + randomString,
description: "test-description_" + randomString,