Venue booking & governance
deliveries
Delivery outbox (ADR-010, Step 16). Every notification that leaves the app (Linear issue, email, push). A cron picks up pending deliveries, sends them, and marks them delivered. Retries capped at 3.
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| subject_type | text inbound_requestbooking_requestbooking_inquiry | no | — | |
| subject_id | uuid | no | — | |
| channel | text linearemail | no | — | |
| target | text | no | — | |
| status | text pendingdeliveredfailed | no | "pending" | |
| attempts | integer | no | 0 | |
| last_error | text | yes | — | |
| external_ref | text | yes | — | |
| created_at | timestamp | no | now() | |
| delivered_at | timestamp | yes | — |
Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.
Keys, constraints & indexes
Unique
None besides the primary key.
Indexes
- (status, created_at)deliveries_status_idx
- (subject_type, subject_id)deliveries_subject_idx
Foreign keys
None.
Used by
Code that reads or writes this table, found by static analysis of the tRPC routers and API handlers (including helpers they call).
tRPC procedures
No public or signed-in procedure.
REST & webhooks
None.
Relations
Rendering diagram…
Diagram source
erDiagram
deliveries {
uuid id PK
} Defined at server/database/schema.ts:1248 as deliveries.