mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Workaround for crap product specific QU conversions for migration 0207 (fixes #2285)
This commit is contained in:
parent
fd7e24b7d1
commit
73ad9d39ab
@ -8,7 +8,8 @@
|
||||
|
||||
### Stock
|
||||
|
||||
- Performance fixes related to the stock overview and purchase/consume/inventory/transfer page
|
||||
- Fixed performance issues related to the stock overview and purchase/consume/inventory/transfer page
|
||||
- Fixed that the upgrade failed when having improperly defined product specific quantity unit conversions
|
||||
|
||||
### Shopping list
|
||||
|
||||
|
@ -40,8 +40,9 @@ INSERT INTO quantity_unit_conversions
|
||||
(from_qu_id, to_qu_id, factor, product_id)
|
||||
SELECT p.qu_id_purchase, p.qu_id_stock, IFNULL(p.qu_factor_purchase_to_stock, 1.0), p.id
|
||||
FROM products p
|
||||
WHERE p.qu_id_stock != qu_id_purchase
|
||||
AND NOT EXISTS(SELECT 1 FROM quantity_unit_conversions WHERE product_id = p.id AND from_qu_id = p.qu_id_stock AND to_qu_id = p.qu_id_purchase);
|
||||
WHERE p.qu_id_stock != p.qu_id_purchase
|
||||
AND NOT EXISTS(SELECT 1 FROM quantity_unit_conversions WHERE product_id = p.id AND from_qu_id = p.qu_id_stock AND to_qu_id = p.qu_id_purchase)
|
||||
AND NOT EXISTS(SELECT 1 FROM quantity_unit_conversions WHERE product_id = p.id AND from_qu_id = p.qu_id_purchase AND to_qu_id = p.qu_id_stock);
|
||||
|
||||
-- ALTER TABLE DROP COLUMN is only available in SQLite >= 3.35.0 (we require 3.34.0 as of now), so can't be used
|
||||
PRAGMA legacy_alter_table = ON;
|
||||
|
Loading…
x
Reference in New Issue
Block a user