# ADR-002: JSONB nullability rationale - **Status**: Accepted - **Date**: 2026-04-19 - **Deciders**: alkdev ## Context Some JSONB columns are NOT NULL (messages.data, parts.data, operations.inputSchema) while others are nullable (sessions.data, spokes.hostInfo, operations.outputSchema). Need a consistent rationale for when JSONB should be nullable. ## Decision JSONB columns are NOT NULL when data is required for the record to be meaningful — a message without role-specific metadata or a part without type-specific content is incomplete. Nullable JSONB columns are for optional, evolving, or context-dependent data. ## Consequences Minimal — this is a convention that matches the semantic meaning of each column. Positive: consistent mental model for schema design. Negative: none significant.