Skip to main content
The Product Edit module, resolved with MercurModules.PRODUCT_EDIT ("product_edit"), owns two data models: ProductChange and ProductChangeAction. Both are defined in packages/core/src/modules/product-edit/models. Every model also gets created_at, updated_at, and deleted_at from Medusa.

ProductChange

A single reviewable edit to one product. Table product_change, id prefix prodch. Relations:
  • actions: has many ProductChangeAction. The model cascades deletes to its actions
Indexes on status, on product_id, and on (product_id, status), all excluding soft-deleted rows.

ProductChangeAction

A single typed operation inside a change. Table product_change_action, id prefix prodchact. Relations:
  • product_change: belongs to ProductChange, nullable
Indexes on product_change_id, product_id, (reference, reference_id), and ordering, all excluding soft-deleted rows.

ProductChangeStatus

The values of ProductChange.status, exported from @mercurjs/types:

ProductChangeActionType

The values of ProductChangeAction.action, exported from @mercurjs/types: The details shape for each type is listed in Change actions. The matching DTOs are ProductChangeDTO and ProductChangeActionDTO, and the create inputs are CreateProductChangeDTO and CreateProductChangeActionDTO, all from @mercurjs/types.