Overview

PostgreSQL schema reference for the Reloop platform.

All relational data lives in a shared PostgreSQL database. Schemas are defined with Drizzle ORM in packages/db/src/schema/ and applied locally with bun db:push.

Not in Postgres

The Logs service stores analytics in ClickHouse, not in these tables.

Schema Files

DomainTablesSource
Authuser, account, verification, jwks, organization, member, invitationauth.ts
API Keyapikeyapi-key.ts
Domaindomain, domain_dns_recorddomain.ts
Webhookwebhook, webhook_event_subscription, webhook_event, webhook_delivery, webhook_delivery_attemptwebhook.ts
Contactcontact, contact_property, contact_property_valuecontact.ts
Channelchannel, channel_subscriptionchannel.ts
Groupgroup, contact_groupgroup.ts
Emailemail_log, email_eventemail.ts
Templatetemplate, template_versiontemplate.ts
Inboxmailbox, inbound_email, inbound_attachmentinbox.ts
Threademail_thread, thread_messagethread.ts
Billingorganization_credits, credit_ledger, email_sendbilling.ts
Uploaduploadupload.ts

Conventions

PatternExample
ID prefixescon_, domain_, wh_, tmpl_, mbx_, eml_
Multi-tenancyMost tables include organization_idorganization.id
Soft deletesdeleted_at timestamp on many domain/contact tables
Timestampscreated_at, updated_at on most mutable tables

Was this page helpful?

Edit this page