Package.json file
"@medusajs/medusa": "2.17.2"
"@medusajs/framework": "2.17.2"
"@medusajs/admin-sdk": "2.17.2"
Node.js version
v24.3.0
Database and its version
PostgreSQL 17.5
Operating system name and version
OS: macOS (also reproduced in our dev environment / Linux)
Browser name
No response
What happended?
Describe the bug
Editing prices in a price list from the Admin UI fails with a 400. The backend logs:
info: column "rules" of relation "price" does not exist
http: POST /admin/price-lists/:id/prices/batch (400)
The Admin console shows:
FetchError: column "rules" of relation "price" does not exist
It triggers when saving a price entry that has no rule overrides (an empty rules: {}), e.g. overriding a variant's price in a price list without setting any price rule.
To Reproduce
Create (or open) a price list.
Add products/variants to it and open Edit prices.
Set/override a price on a variant without adding any price rule.
Save.
The POST /admin/price-lists/:id/prices/batch request returns 400 with column "rules" of relation "price" does not exist.
Expected behavior
The price is saved. An empty rules: {} should be a no-op, not attempt to persist a nonexistent rules column.
Actual behavior
The POST /admin/price-lists/:id/prices/batch request returns 400 with column "rules" of relation "price" does not exist.
Link to reproduction repo
https://github.com/Celhajjami/my-bug-store.git
Package.json file
Node.js version
v24.3.0
Database and its version
PostgreSQL 17.5
Operating system name and version
OS: macOS (also reproduced in our dev environment / Linux)
Browser name
No response
What happended?
Describe the bug
Editing prices in a price list from the Admin UI fails with a 400. The backend logs:
info: column "rules" of relation "price" does not exist
http: POST /admin/price-lists/:id/prices/batch (400)
The Admin console shows:
FetchError: column "rules" of relation "price" does not exist
It triggers when saving a price entry that has no rule overrides (an empty rules: {}), e.g. overriding a variant's price in a price list without setting any price rule.
To Reproduce
Create (or open) a price list.
Add products/variants to it and open Edit prices.
Set/override a price on a variant without adding any price rule.
Save.
The POST /admin/price-lists/:id/prices/batch request returns 400 with column "rules" of relation "price" does not exist.
Expected behavior
The price is saved. An empty rules: {} should be a no-op, not attempt to persist a nonexistent rules column.
Actual behavior
The POST /admin/price-lists/:id/prices/batch request returns 400 with column "rules" of relation "price" does not exist.
Link to reproduction repo
https://github.com/Celhajjami/my-bug-store.git