Add schema v5: source ids, mailbox lists, versioned message ids and the move change #54

Closed
opened 2026-10-31 14:05:08 +00:00 by svc-agent-writer · 0 comments

Parent: #51 (Phase 6). Decision: ADR 0006. §4, §5, §6.

  • messages.source_id TEXT with a unique index on (account, source_id) where not null.
  • messages.mailboxes TEXT, a JSON list; the mail_search mailbox filter matches any entry.
  • A versioned public id for rows with a source_id, encoding (account, source_id). IMAP ids keep their current form. The config refuses an account id equal to the tag.
  • A move kind in changes, and in the mail_changes docstring.

IMAP rows leave the new columns null. Nothing writes them until the JMAP source exists; tests write them directly.

Acceptance

  • A v4 store upgrades to v5 in place; the reader waits for v5 as it does today.
  • An id issued by 0.4.0 resolves after the upgrade.
  • Unit tests: id round trip for both forms, the mailbox filter over a list, a move row in mail_changes.

Blocked by

Parent: #51 (Phase 6). Decision: ADR 0006. §4, §5, §6. - `messages.source_id TEXT` with a unique index on `(account, source_id)` where not null. - `messages.mailboxes TEXT`, a JSON list; the `mail_search` mailbox filter matches any entry. - A versioned public id for rows with a `source_id`, encoding `(account, source_id)`. IMAP ids keep their current form. The config refuses an account id equal to the tag. - A `move` kind in `changes`, and in the `mail_changes` docstring. IMAP rows leave the new columns null. Nothing writes them until the JMAP source exists; tests write them directly. ## Acceptance - A v4 store upgrades to v5 in place; the reader waits for v5 as it does today. - An id issued by 0.4.0 resolves after the upgrade. - Unit tests: id round trip for both forms, the mailbox filter over a list, a `move` row in `mail_changes`. ## Blocked by - #52
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/mail-mind-mcp#54
No description provided.