feat: per-event reminders + default reminder setting (server)
local_events gains a `reminders` TEXT column (comma-separated minutes-before- start, like exdate); EventCreate/EventUpdate accept a `reminders: [int]` list and build_local_event_dict emits it back as a list. user_settings gains `default_reminder_minutes` (nullable int, null = off), exposed/updatable via /api/settings (explicit null persists as off). Migrations added in _migrate(). Clients (iOS/Android) schedule the OS notifications locally from these. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,20 @@ def _migrate():
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
conn.execute(text("ALTER TABLE local_events ADD COLUMN reminders TEXT"))
|
||||
conn.commit()
|
||||
logging.info("Migration: added reminders to local_events")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
conn.execute(text("ALTER TABLE user_settings ADD COLUMN default_reminder_minutes INTEGER"))
|
||||
conn.commit()
|
||||
logging.info("Migration: added default_reminder_minutes to user_settings")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
try:
|
||||
conn.execute(text("ALTER TABLE user_settings ADD COLUMN month_divider_color VARCHAR(7) DEFAULT '#7090c0'"))
|
||||
conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user