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
| Domain | Tables | Source |
|---|---|---|
| Auth | user, account, verification, jwks, organization, member, invitation | auth.ts |
| API Key | apikey | api-key.ts |
| Domain | domain, domain_dns_record | domain.ts |
| Webhook | webhook, webhook_event_subscription, webhook_event, webhook_delivery, webhook_delivery_attempt | webhook.ts |
| Contact | contact, contact_property, contact_property_value | contact.ts |
| Channel | channel, channel_subscription | channel.ts |
| Group | group, contact_group | group.ts |
email_log, email_event | email.ts | |
| Template | template, template_version | template.ts |
| Inbox | mailbox, inbound_email, inbound_attachment | inbox.ts |
| Thread | email_thread, thread_message | thread.ts |
| Billing | organization_credits, credit_ledger, email_send | billing.ts |
| Upload | upload | upload.ts |
Conventions
| Pattern | Example |
|---|---|
| ID prefixes | con_, domain_, wh_, tmpl_, mbx_, eml_ |
| Multi-tenancy | Most tables include organization_id → organization.id |
| Soft deletes | deleted_at timestamp on many domain/contact tables |
| Timestamps | created_at, updated_at on most mutable tables |
Was this page helpful?