Support "every N days/weeks/months/years" recurrence - #12
Merged
Merged
Conversation
…ars) recurrenceMode is now the unit (none/days/weeks/months/years) and the new recurrenceInterval column the count. update-012.sql migrates existing day-based values. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7dZbS92Qut5kn2ftoFq72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
todo.recurrenceModeis now the unit (0 none, 1 day, 2 week, 3 month, 4 year) and the newtodo.recurrenceIntervalholds N (1–999).todotable. Recurrence is 1:1 with a todo and read on every list query, so a separate table would only add a join.DATE_ADD(..., INTERVAL n UNIT). The helperrecurrenceNextSql()is in the newqueries/recurrence.php.update.phpvalidates the unit and the interval.Migration
sql/update-012.sqladds the column and converts the old day values. For example 7 becomes 1 week, 14 becomes 2 weeks, 30 becomes 1 month, 91 becomes 3 months and 365 becomes 1 year. Values that match nothing stay as days.sql/install.sqlhas the new schema and db.version is now 12.Testing
node --checkpass.npm testand tryupdate-012.sqlon an old-schema copy.🤖 Generated with Claude Code
https://claude.ai/code/session_01V7dZbS92Qut5kn2ftoFq72
Generated by Claude Code