Skip to main content

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

TablePurpose
organizationsOrg records — the top-level multi-tenant unit
usersUser accounts
user_organizationsMany-to-many: user ↔ org membership with role
user_sessionsActive session tracking
roomsVirtual room records
room_typesRoom type catalogue
room_presenceLive participant presence state per room
valid_room_combinationsAllowed room type configurations
recordingsRecording metadata (egress ID, status, storage path)
recording_participantsParticipants present during a recording
integrationsAvailable third-party integration definitions
user_integrationsPer-user integration connections (e.g. Google Calendar)
guestsGuest (unauthenticated) access records
subscription_linkLinks orgs to their WorkOS subscription/plan
org_licensesOrg-level license state synced from WorkOS
user_licensesPer-user license entitlements

Private schema

TablePurpose
private.chat_conversationsChat conversation records
private.chat_conversation_membersConversation membership
private.chat_messagesIndividual chat messages
private.chat_reactionsEmoji reactions on messages
private.chat_attachmentsFile attachments on messages
private.chat_user_presencePer-user presence state in chat
private.participant_activity_metricsRoom activity metrics per participant
private.event_cursorsWorkOS event stream cursor (used by eventsync worker)
private.event_inboxDeduplicated inbound WorkOS events (used by eventsync worker)