mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Fixed chore upgrade handling when having nonsensical user data (fixes #1826)
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
- The `Daily` period type has been changed to schedule the chore at the _same time_ (based on the start date) each `n` days
|
||||
- This period type scheduled chores `n` days _after the last execution_ before, which is also possible by using the `Hourly` period type and a corresponding period interval; all existing `Daily` schedules will be converted to that on migration
|
||||
- Fixed that when consuming a parent product on chore execution (chore option "Consume product on chore execution"), no child products were used if the parent product itself is not in-stock
|
||||
- Fixed that the upgrade to v3.2.0 failed when having any former "Dynamic Regular" chore with a "Period interval" of `0` (which makes absolutely no sense in reality)
|
||||
|
||||
### Calendar
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
UPDATE chores
|
||||
SET period_type = 'daily',
|
||||
period_interval = period_days,
|
||||
period_interval = CASE WHEN IFNULL(period_days, 0) = 0 THEN 1 ELSE period_days END,
|
||||
period_days = null
|
||||
WHERE period_type = 'dynamic-regular';
|
||||
|
||||
|
Reference in New Issue
Block a user