Phase 1 of docs/OWN-STORE.md. Four tables — task_lists, tasks, task_alarms, accounts — with the indices, cascades and converters the plan specifies, plus a DAO per table and the v1 schema JSON committed for migration testing. Masters and RECURRENCE-ID overrides share the tasks table, so the unique index is on (list_id, uid, recurrence_id): an override shares its master's UID, and a key without recurrence_id would reject exactly the rows recurrence depends on. SQLite treats NULLs as distinct, so that index only enforces the override half; the master half is intent, noted where the index is declared. PRIORITY is stored as the raw iCalendar integer rather than through the Priority enum. Priority buckets 1..4 into HIGH, so a converter would rewrite a server's PRIORITY:3 as 1 before it ever reached disk — the bucketing belongs in the mapper. Status keeps its converter: that mapping is total. Two cascades the plan left unstated: deleting a list takes its tasks, deleting an account only detaches its lists. Instrumented tests cover read-back, the cascades and the unique index — app/src/androidTest is new.
16 KiB
16 KiB