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
2025-04-09 13:21:33 +02:00
committed by GitHub
parent 13e159d8ad
commit cb26c224ea
6 changed files with 277 additions and 209 deletions

View File

@@ -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

View File

@@ -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