Tables
One page per database table. Each page covers the table's purpose, its columns, key constraints, and which backend features write to or read from it.
Phase 0 note: individual table pages to be generated during baseline generation.
Table inventory
Tables are defined in internal/database/migrations/. The schema uses two schemas: public (default) and private (sensitive/internal data).
Public schema
| Table | Purpose |
|---|---|
organizations | Org records — the top-level multi-tenant unit |
users | User accounts |
user_organizations | Many-to-many: user ↔ org membership with role |
user_sessions | Active session tracking |
rooms | Virtual room records |
room_types | Room type catalogue |
room_presence | Live participant presence state per room |
valid_room_combinations | Allowed room type configurations |
recordings | Recording metadata (egress ID, status, storage path) |
recording_participants | Participants present during a recording |
integrations | Available third-party integration definitions |
user_integrations | Per-user integration connections (e.g. Google Calendar) |
guests | Guest (unauthenticated) access records |
subscription_link | Links orgs to their WorkOS subscription/plan |
org_licenses | Org-level license state synced from WorkOS |
user_licenses | Per-user license entitlements |
Private schema
| Table | Purpose |
|---|---|
private.chat_conversations | Chat conversation records |
private.chat_conversation_members | Conversation membership |
private.chat_messages | Individual chat messages |
private.chat_reactions | Emoji reactions on messages |
private.chat_attachments | File attachments on messages |
private.chat_user_presence | Per-user presence state in chat |
private.participant_activity_metrics | Room activity metrics per participant |
private.event_cursors | WorkOS event stream cursor (used by eventsync worker) |
private.event_inbox | Deduplicated inbound WorkOS events (used by eventsync worker) |