Improved product average shelf life calculation (references #2283)

This commit is contained in:
Bernd Bestel 2023-07-31 17:41:36 +02:00
parent 5d48b02b37
commit ca740e8cee
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

14
migrations/0222.sql Normal file
View File

@ -0,0 +1,14 @@
CREATE INDEX ix_stock_log_performance1 on stock_log (
stock_id,
transaction_type,
amount
);
CREATE INDEX ix_stock_log_performance2 on stock_log (
product_id,
best_before_date,
purchased_date,
transaction_type,
stock_id,
undone
);