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 14:53:33 +01:00
committed by GitHub
parent e82b4788ec
commit 87e63c024e
17 changed files with 897 additions and 138 deletions

View File

@@ -20,7 +20,7 @@ export interface ShippingOptionDTO {
price_type: ShippingOptionPriceType
service_zone_id: string
shipping_profile_id: string
fulfillment_provider_id: string
provider_id: string
shipping_option_type_id: string | null
data: Record<string, unknown> | null
metadata: Record<string, unknown> | null

View File

@@ -7,7 +7,7 @@ export interface CreateShippingOptionDTO {
price_type: ShippingOptionPriceType
service_zone_id: string
shipping_profile_id: string
fulfillment_provider_id: string
provider_id: string
type: Omit<CreateShippingOptionTypeDTO, "shipping_option_id">
data?: Record<string, unknown> | null
rules?: Omit<CreateShippingOptionRuleDTO, "shipping_option_id">[]
@@ -19,7 +19,7 @@ export interface UpdateShippingOptionDTO {
price_type?: ShippingOptionPriceType
service_zone_id?: string
shipping_profile_id?: string
fulfillment_provider_id?: string
provider_id?: string
type: Omit<CreateShippingOptionTypeDTO, "shipping_option_id"> | { id: string }
data?: Record<string, unknown> | null
rules?: (