Skip to main content

Migration Plan

:::info Source Sourced from services/marketplace-service/MIGRATION_PLAN.md in the documentation repo. :::

1. Core Rules

  • Purchase saga (F20) frozen M2 start — steps and compensations additive only; breaking → new saga v2 with dual-run.
  • Order line schema versioned; historical orders displayed with original shape.
  • Pricing plan kinds additive; new kinds don't affect existing.

2. Database

  • Additive columns nullable.
  • JSONB pricing plans versioned.
  • Monetary fields in micro-units (avoid float migration risk).

3. API

  • URL major on breaking.
  • Pact contracts frozen with consumers; breaking requires dual-serve.

4. Event Versioning

EventvPolicy
marketplace.order.placed.v1v1Additive lines; new plan kinds additive
marketplace.license.granted.v1v1Additive fields
marketplace.listing.approved.v1v1Additive marketing fields

5. Saga Versioning

  • Step addition: new saga v2 with added step; dual-run window ≥ 1 milestone.
  • Step removal: deprecated; existing sagas finish on old; new start on new.
  • Compensation logic changes: only additive (more compensations OK, removing compensation requires audit).

6. Pricing Plan Evolution

  • New plan kind (e.g., "pay-what-you-want"): additive; existing plans unchanged.
  • Currency additions: additive; tenant chooses supported currencies.
  • Taxation model: per-region; additive per region.

7. Review System Evolution

  • Review schema additive.
  • Sentiment analysis integration additive.
  • Legacy reviews retained with original structure.

8. KYC Integration

  • KYC provider is pluggable (via ACL).
  • New provider: ACL translator; existing verified providers remain valid.
  • KYC re-verification triggers: configurable per tenant plan.

9. Multi-Currency Evolution (M5+)

  • Money type in micro-units + ISO 4217 currency.
  • Existing orders display original currency.
  • FX conversion rates snapshotted at order time.

10. White-Label Evolution (M5+)

  • Branding config per listing; tenant-scoped.
  • Public-facing listing pages serve with tenant branding.

11. Data Residency

  • Orders + Listings pinned to buyer/provider home region.
  • Cross-region saga supported.

12. GDPR

  • Order retention per tax law (7 years typical).
  • User PII anonymized on erasure; order record retained with anon-id.

13. Changelog

Per-release: new pricing plans, currency additions, saga version changes, KYC provider changes.