Fixed chore upgrade handling when having nonsensical user data (fixes #1826)

This commit is contained in:
Bernd Bestel
2022-03-23 17:17:39 +01:00
parent 23f285c3fb
commit dce14b8999
2 changed files with 2 additions and 1 deletions

View File

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