Skip to main content

Migration Guide

All migration instructions are consolidated in a single file:

MIGRATION.md

Covers: v2 → v3, v3 → v4, and v4 → v5.

v4 → v5 highlights​

The full details (with before/after snippets) are in MIGRATION.md. The breaking changes most likely to affect your code:

  • Plugin registration. Director.registerAdapter() is removed. Register built-ins via the presets (registerAllPlugins()), author custom adapters with the registerX() factories, or use pluginRegistry.register() with a hand-built IPlugin.
  • Leveled pricing. Catalog price tiers are keyed by minQuantity (lower bound; base = 0) instead of maxQuantity. An automatic, idempotent startup migration converts existing data — but update any code that writes prices to use minQuantity. See Leveled Pricing.
  • Events. Redis / EventBridge transports must be registered explicitly with setEmitAdapter(RedisEventEmitter()) (no more auto-registration on import).
  • Auth, admin-ui, dependencies. Stateless JWT auth (set UNCHAINED_TOKEN_SECRET), runtime admin-ui permissions, and several dependency bumps — see the full guide.
  • Server wiring. connect() is async and mounts plugin routes itself; initPluginMiddlewares and the framework route presets are gone.
  • Ticketing. @unchainedshop/ticketing is registered as a plugin (createTicketingPlugin, withTicketing) with its own ticket issuer; setupTicketing and the lib/express.js / lib/fastify.js connectors are removed, and the ETH minter no longer applies ticket rules. The Ticketing section of MIGRATION.md walks through custom schemas, templates, reimbursement codes, the provider swap and gate access; see also Event Ticketing.

General Upgrade Process​

  1. Read the migration guide for your target version
  2. Update dependencies in package.json
  3. Start the platform - database migrations run automatically on startup of instances with workers enabled (disableWorker / UNCHAINED_DISABLE_WORKER skip them); a failed migration is logged and startup continues
  4. Update code for any breaking API changes
  5. Test thoroughly before deploying to production

Getting Help​