chore(pricing): improve calculate prices performances (#12120)

* chore(pricing): Try to improve performances

* chore(pricing): new indexes

* chore(pricing): new indexes

* fix orderr

* Create olive-horses-judge.md

* feedback
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2025-04-09 13:21:33 +02:00
1 parent 13e159d8ad
commit cb26c224ea
6 files changed
+277 -209

No files matched your search

@@ -15,6 +15,10 @@ const PriceListRule = model
on: ["price_list_id"],
where: "deleted_at IS NULL",
},
{
on: ["attribute"],
where: "deleted_at IS NULL",
},
])
export default PriceListRule
@@ -18,6 +18,14 @@ const PriceRule = model
where: "deleted_at IS NULL",
unique: true,
},
{
on: ["attribute", "value"],
where: "deleted_at IS NULL",
},
{
on: ["operator", "value"],
where: "deleted_at IS NULL",
},
])
export default PriceRule