Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | serial | 10 | √ | nextval('calendar_events_id_seq'::regclass) |
|
|
{“what”:“Unique numeric identifier for the event row.”,“why”:“Primary key for stable references and joins.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.230629787+00:00”} |
||||
| channel | text | 2147483647 | null |
|
|
{“what”:“Integration channel name (e.g., ‘google’, ‘outlook’) that sourced the event.”,“why”:“Distinguishes providers; needed for provider-specific sync logic.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.259835041+00:00”} |
|||||
| provider_event_id | text | 2147483647 | null |
|
|
{“what”:“Event ID as assigned by the external calendar provider.”,“why”:“Maps to provider’s event to avoid duplicates and support updates.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.280374978+00:00”} |
|||||
| calendar_id | text | 2147483647 | √ | null |
|
|
{“what”:“External calendar identifier within the provider (e.g., calendar email).”,“why”:“Groups events by calendar; needed for per-calendar sync and filtering.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.293538545+00:00”} |
||||
| account_id | text | 2147483647 | null |
|
|
{“what”:“User account identifier that owns the event in the system.”,“why”:“Scopes events to a user; essential for access control and per-user queries.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.328201310+00:00”} |
|||||
| summary | text | 2147483647 | √ | null |
|
|
{“what”:“Event title or subject as provided by the calendar.”,“why”:“Shows event name in UI; missing summary makes events unrecognizable.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.346124300+00:00”} |
||||
| description | text | 2147483647 | √ | null |
|
|
{“what”:“Full event description or notes from the provider.”,“why”:“Preserves details; without it, event context is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.364872144+00:00”} |
||||
| location | text | 2147483647 | √ | null |
|
|
{“what”:“Physical location or venue string for the event.”,“why”:“Provides address info; needed for maps and scheduling conflicts.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.380426792+00:00”} |
||||
| start_time | timestamptz | 35,6 | √ | null |
|
|
{“what”:“Event start date and time in UTC with timezone.”,“why”:“Determines when event begins; missing start breaks scheduling and reminders.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.392897709+00:00”} |
||||
| end_time | timestamptz | 35,6 | √ | null |
|
|
{“what”:“Event end date and time in UTC with timezone.”,“why”:“Defines event duration; needed for conflict detection and calendar display.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.411467395+00:00”} |
||||
| all_day | bool | 1 | √ | false |
|
|
{“what”:“Flag indicating the event spans a full day (no specific time).”,“why”:“Changes rendering and timezone handling; without it, all-day events misalign.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.432645781+00:00”} |
||||
| status | text | 2147483647 | √ | null |
|
|
{“what”:“Event status from provider (e.g., confirmed, tentative, cancelled).”,“why”:“Filters cancelled events; missing status may show stale events.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.451975845+00:00”} |
||||
| organizer_email | text | 2147483647 | √ | null |
|
|
{“what”:“Email address of the event organizer.”,“why”:“Identifies who created the event; needed for attendee management and permissions.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.470558717+00:00”} |
||||
| attendees | jsonb | 2147483647 | √ | null |
|
|
{“what”:“JSON array of attendee objects with email, name, response status.”,“why”:“Tracks participants and RSVPs; without it, invitee info is unavailable.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.504761642+00:00”} |
||||
| contact_id | int4 | 10 | √ | null |
|
|
{“what”:“Foreign key to a contact record associated with this event.”,“why”:“Links event to a CRM contact; enables contact-centric views.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.530674886+00:00”} |
||||
| business_id | int4 | 10 | √ | null |
|
|
{“what”:“Foreign key to a business or organization owning the event.”,“why”:“Scopes events to a business; needed for multi-tenant data isolation.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.550186024+00:00”} |
||||
| source_account | text | 2147483647 | √ | null |
|
|
{“what”:“Original account identifier from the provider, if different from account_id.”,“why”:“Preserves provider account mapping; helps when accounts are merged or migrated.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.566855963+00:00”} |
||||
| metadata | jsonb | 2147483647 | √ | null |
|
|
{“what”:“Arbitrary provider-specific key-value metadata for the event.”,“why”:“Stores extra fields without schema changes; needed for provider-specific features.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.593680110+00:00”} |
||||
| created_at | timestamptz | 35,6 | √ | now() |
|
|
{“what”:“Timestamp when the event row was inserted into the database.”,“why”:“Audit trail and ordering; missing it makes row creation time unknown.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T00:08:33.624506750+00:00”} |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| calendar_events_pkey | Primary key | Asc | id |
| calendar_events_channel_provider_event_id_key | Must be unique | Asc/Asc | channel + provider_event_id |
| idx_cal_account | Performance | Asc | account_id |
| idx_cal_contact | Performance | Asc | contact_id |
| idx_cal_start | Performance | Asc | start_time |