Add systemPayload jsonb nullable to messages. System messages carry structured JSON for events (member joined/left, device added/revoked, conversation renamed, MLS epoch change). These are NOT secret — they are routing/UX events. Add a check constraint ensuring systemPayload is null for non-system messages.
Acceptance criteria:
systemPayload column added; only set when contentType='system'
- System events ordered inline with real messages
- Check constraint prevents
systemPayload on non-system messages
Add
systemPayloadjsonb nullable tomessages. System messages carry structured JSON for events (member joined/left, device added/revoked, conversation renamed, MLS epoch change). These are NOT secret — they are routing/UX events. Add a check constraint ensuringsystemPayloadis null for non-system messages.Acceptance criteria:
systemPayloadcolumn added; only set whencontentType='system'systemPayloadon non-system messages