Events & Registration
Synced from
docs/generated/erd/— do not hand-edit.
Regenerate withbun run docs:erd(needs staging reader), then this script runs automatically.
Labels:docs/db/erd-table-labels.yml· Runbook:docs/runbooks/erd-schema-docs.md
Description
Section titled “Description”Chamber events, ticket types, registrations, check-ins, sessions/speakers,
promo codes, registration forms, signature events (core). Catalog §3.1.
Tables
Section titled “Tables”Chamber event core
Section titled “Chamber event core”Event, tickets, registrations, check-ins
| Name | Columns | Comment | Type |
|---|---|---|---|
chamber_event_check_ins |
7 | BASE TABLE | |
chamber_event_invitations |
6 | BASE TABLE | |
chamber_event_registrations |
27 | BASE TABLE | |
chamber_event_ticket_types |
9 | BASE TABLE | |
chamber_event_waitlist |
16 | BASE TABLE | |
| public.chamber_events | 77 | THE event row — everything on the calendar, public or member-only — Not: signature_events (a planning workspace) or event_templates (a blueprint) | BASE TABLE |
Event content & staff
Section titled “Event content & staff”Sessions, speakers, sponsors, staff
| Name | Columns | Comment | Type |
|---|---|---|---|
event_content |
10 | BASE TABLE | |
event_feedback |
22 | BASE TABLE | |
event_photos |
9 | BASE TABLE | |
event_sessions |
12 | BASE TABLE | |
event_speakers |
13 | BASE TABLE | |
event_sponsor_slots |
9 | BASE TABLE | |
event_staff_assignments |
28 | BASE TABLE | |
event_testimonial_consents |
15 | BASE TABLE |
Registration forms
Section titled “Registration forms”Configurable registration forms
| Name | Columns | Comment | Type |
|---|---|---|---|
event_promo_codes |
12 | BASE TABLE | |
registration_form_fields |
13 | BASE TABLE | |
registration_form_submissions |
12 | BASE TABLE | |
registration_forms |
10 | BASE TABLE |
Templates & sequences
Section titled “Templates & sequences”Reusable event templates and email sequences
| Name | Columns | Comment | Type |
|---|---|---|---|
event_email_sequences |
7 | BASE TABLE | |
event_sequence_emails |
23 | BASE TABLE | |
event_sequence_template_steps |
12 | BASE TABLE | |
event_sequence_templates |
9 | BASE TABLE | |
| public.event_templates | 10 | Reusable event blueprint used to seed a new chamber_events row — Not: event_sequence_templates (email sequences); not an event itself | BASE TABLE |
Signature events
Section titled “Signature events”Large-format / multi-day event shell
| Name | Columns | Comment | Type |
|---|---|---|---|
signature_event_linked_events |
6 | BASE TABLE | |
| public.signature_events | 20 | Flagship-event PLANNING workspace (budget, stage, owner); links to chamber_events — Not: An event on the calendar — the real event row is chamber_events | BASE TABLE |
| Name | Columns | Comment | Type |
|---|---|---|---|
event_approval_tokens |
8 | BASE TABLE | |
event_connection_intents |
14 | BASE TABLE | |
event_connection_suggestions |
10 | BASE TABLE | |
event_poll_dates |
10 | BASE TABLE | |
event_slug_history |
5 | BASE TABLE | |
location_bookings |
14 | BASE TABLE | |
location_rooms |
18 | Rooms within a location (#3995, epic #3987 T2). Compositional children — no independent lifecycle. Soft-archive only, mirroring locations. | BASE TABLE |
location_wayfinding_section_images |
8 | Multiple images per wayfinding section (#3996). One row per image, mirroring event_photos — NOT media_assets/media_asset_usages (0 rows on staging, two latent defects, #3125). | BASE TABLE |
location_wayfinding_sections |
12 | Typed wayfinding sections owned by a location (#3996, epic #3987 T3). Compositional children — no independent lifecycle. Soft-archive only, mirroring locations/location_rooms. | BASE TABLE |
locations |
25 | Platform source of truth for bookable/physical places (#3994, epic #3987). Live system of record — org_locations dropped in this migration alongside the app cutover. Rooms + wayfinding land in later tickets (T2). | BASE TABLE |
| public.members | 17 | Member identity hub row (org-scoped); satellites hold profile/billing/metrics — Not: Full member payload — write profiles/billing/metrics to their tables — See: docs/PLATFORM.md | BASE TABLE |
organizations |
40 | BASE TABLE | |
seating_tables |
9 | BASE TABLE |
Relations
Section titled “Relations”erDiagram
"public.chamber_event_check_ins" }o--|| "public.chamber_event_registrations" : "FOREIGN KEY (registration_id) REFERENCES chamber_event_registrations(id) ON DELETE CASCADE"
"public.chamber_event_check_ins" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.chamber_event_invitations" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.chamber_event_registrations" }o--o| "public.chamber_event_ticket_types" : "FOREIGN KEY (ticket_type_id) REFERENCES chamber_event_ticket_types(id) ON DELETE SET NULL"
"public.chamber_event_registrations" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.chamber_event_registrations" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.chamber_event_ticket_types" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.chamber_event_waitlist" }o--o| "public.chamber_event_registrations" : "FOREIGN KEY (registration_id) REFERENCES chamber_event_registrations(id) ON DELETE SET NULL"
"public.chamber_event_waitlist" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.chamber_event_waitlist" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.chamber_event_waitlist" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.chamber_events" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.chamber_events" }o--o| "public.registration_forms" : "FOREIGN KEY (feedback_survey_id) REFERENCES registration_forms(id) ON DELETE SET NULL"
"public.chamber_events" }o--o| "public.registration_forms" : "FOREIGN KEY (registration_form_id) REFERENCES registration_forms(id)"
"public.chamber_events" }o--o| "public.registration_forms" : "FOREIGN KEY (registration_survey_id) REFERENCES registration_forms(id) ON DELETE SET NULL"
"public.chamber_events" }o--o| "public.locations" : "FOREIGN KEY (location_id) REFERENCES locations(id) ON DELETE RESTRICT"
"public.chamber_events" }o--o| "public.location_rooms" : "FOREIGN KEY (location_room_id) REFERENCES location_rooms(id) ON DELETE RESTRICT"
"public.event_approval_tokens" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_connection_intents" }o--o| "public.chamber_event_registrations" : "FOREIGN KEY (registration_id) REFERENCES chamber_event_registrations(id) ON DELETE SET NULL"
"public.event_connection_intents" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_connection_intents" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.event_connection_intents" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_connection_suggestions" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_connection_suggestions" }o--|| "public.members" : "FOREIGN KEY (member_a_id) REFERENCES members(id) ON DELETE CASCADE"
"public.event_connection_suggestions" }o--|| "public.members" : "FOREIGN KEY (member_b_id) REFERENCES members(id) ON DELETE CASCADE"
"public.event_connection_suggestions" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_content" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_email_sequences" |o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_feedback" }o--o| "public.chamber_event_registrations" : "FOREIGN KEY (registration_id) REFERENCES chamber_event_registrations(id) ON DELETE SET NULL"
"public.event_feedback" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_feedback" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.event_feedback" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_photos" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_photos" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_poll_dates" }o--o| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_poll_dates" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_promo_codes" }o--o| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_sequence_emails" }o--|| "public.event_email_sequences" : "FOREIGN KEY (sequence_id) REFERENCES event_email_sequences(id) ON DELETE CASCADE"
"public.event_sequence_template_steps" }o--|| "public.event_sequence_templates" : "FOREIGN KEY (template_id) REFERENCES event_sequence_templates(id) ON DELETE CASCADE"
"public.event_sessions" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_slug_history" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_speakers" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_speakers" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.event_speakers" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_sponsor_slots" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_sponsor_slots" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.event_staff_assignments" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.event_staff_assignments" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.event_testimonial_consents" }o--|| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE RESTRICT"
"public.event_testimonial_consents" }o--|| "public.event_feedback" : "FOREIGN KEY (feedback_id) REFERENCES event_feedback(id) ON DELETE RESTRICT"
"public.event_testimonial_consents" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id) ON DELETE CASCADE"
"public.location_bookings" }o--o| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE SET NULL"
"public.location_bookings" }o--o| "public.members" : "FOREIGN KEY (booked_for_member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.location_bookings" }o--|| "public.locations" : "FOREIGN KEY (location_id) REFERENCES locations(id) ON DELETE RESTRICT"
"public.location_rooms" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id) ON DELETE CASCADE"
"public.location_rooms" }o--|| "public.locations" : "FOREIGN KEY (location_id) REFERENCES locations(id) ON DELETE RESTRICT"
"public.location_rooms" }o--o| "public.location_rooms" : "FOREIGN KEY (parent_room_id) REFERENCES location_rooms(id) ON DELETE SET NULL"
"public.location_wayfinding_section_images" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id) ON DELETE CASCADE"
"public.location_wayfinding_section_images" }o--|| "public.location_wayfinding_sections" : "FOREIGN KEY (section_id) REFERENCES location_wayfinding_sections(id) ON DELETE CASCADE"
"public.location_wayfinding_sections" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id) ON DELETE CASCADE"
"public.location_wayfinding_sections" }o--|| "public.locations" : "FOREIGN KEY (location_id) REFERENCES locations(id) ON DELETE RESTRICT"
"public.locations" }o--o| "public.members" : "FOREIGN KEY (offered_by_member_id) REFERENCES members(id) ON DELETE SET NULL"
"public.locations" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id) ON DELETE CASCADE"
"public.members" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.organizations" }o--o| "public.organizations" : "FOREIGN KEY (parent_org_id) REFERENCES organizations(id) ON DELETE SET NULL"
"public.registration_form_fields" }o--|| "public.registration_forms" : "FOREIGN KEY (form_id) REFERENCES registration_forms(id) ON DELETE CASCADE"
"public.registration_form_submissions" }o--o| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id)"
"public.registration_form_submissions" }o--o| "public.members" : "FOREIGN KEY (member_id) REFERENCES members(id)"
"public.registration_form_submissions" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.registration_form_submissions" }o--|| "public.registration_forms" : "FOREIGN KEY (form_id) REFERENCES registration_forms(id)"
"public.registration_forms" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.seating_tables" }o--o| "public.chamber_events" : "FOREIGN KEY (event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.seating_tables" }o--|| "public.organizations" : "FOREIGN KEY (org_id) REFERENCES organizations(id)"
"public.signature_event_linked_events" }o--|| "public.chamber_events" : "FOREIGN KEY (chamber_event_id) REFERENCES chamber_events(id) ON DELETE CASCADE"
"public.signature_event_linked_events" }o--|| "public.signature_events" : "FOREIGN KEY (signature_event_id) REFERENCES signature_events(id) ON DELETE CASCADE"
"public.signature_events" }o--o| "public.locations" : "FOREIGN KEY (location_id) REFERENCES locations(id) ON DELETE RESTRICT"
"public.chamber_event_check_ins" {
uuid event_id ""
uuid registration_id ""
}
"public.chamber_event_invitations" {
uuid event_id ""
}
"public.chamber_event_registrations" {
uuid event_id ""
uuid id ""
uuid member_id ""
uuid ticket_type_id ""
}
"public.chamber_event_ticket_types" {
uuid event_id ""
uuid id ""
}
"public.chamber_event_waitlist" {
uuid event_id ""
uuid member_id ""
text org_id ""
uuid registration_id ""
}
"public.chamber_events" {
uuid feedback_survey_id ""
uuid id ""
uuid location_id "FK to locations (#3997, epic #3987 T4). NULL means the event still uses the legacy free-text location/venue_name/address/city/region/postal_code/country fields as the render source. Attaching a location does not clear those columns — they remain a fallback and an audit trail."
uuid location_room_id "Optional FK to location_rooms, only meaningful when location_id is set. Enforced same-location membership via trg_chamber_events_location_org_guard, not a DB constraint (no CHECK can join to another table)."
text org_id ""
uuid registration_form_id ""
uuid registration_survey_id ""
}
"public.event_approval_tokens" {
uuid event_id ""
}
"public.event_connection_intents" {
uuid event_id ""
uuid member_id ""
text org_id ""
uuid registration_id ""
}
"public.event_connection_suggestions" {
uuid event_id ""
uuid member_a_id ""
uuid member_b_id ""
text org_id ""
}
"public.event_content" {
uuid event_id ""
}
"public.event_email_sequences" {
uuid event_id ""
uuid id ""
}
"public.event_feedback" {
uuid event_id ""
uuid id ""
uuid member_id ""
text org_id ""
uuid registration_id ""
}
"public.event_photos" {
uuid event_id ""
text org_id ""
}
"public.event_poll_dates" {
uuid event_id ""
text org_id ""
}
"public.event_promo_codes" {
uuid event_id ""
}
"public.event_sequence_emails" {
uuid sequence_id ""
}
"public.event_sequence_template_steps" {
uuid template_id ""
}
"public.event_sequence_templates" {
uuid id ""
}
"public.event_sessions" {
uuid event_id ""
}
"public.event_slug_history" {
uuid event_id ""
}
"public.event_speakers" {
uuid event_id ""
uuid member_id ""
text org_id ""
}
"public.event_sponsor_slots" {
uuid event_id ""
text org_id ""
}
"public.event_staff_assignments" {
uuid event_id ""
uuid member_id "KNOWN RESIDUAL, stated not built: no trigger or RLS check confirms the referenced member.org_id matches this row's org_id. A cross-org guard could follow 20260818160000's groups.meeting_location_id precedent; out of scope for #5313 and rated material-not-blocking by the adversarial pass on the first draft."
}
"public.event_templates" {
}
"public.event_testimonial_consents" {
uuid event_id ""
uuid feedback_id ""
text org_id ""
}
"public.location_bookings" {
uuid booked_for_member_id ""
uuid event_id ""
uuid location_id ""
}
"public.location_rooms" {
uuid id ""
uuid location_id ""
text org_id ""
uuid parent_room_id "#5307 one-level nesting (a breakout inside a hall). Same org AND same location enforced by trigger; ON DELETE SET NULL so a hard delete never orphans. No cycle guard at v1 — UI nests one level."
}
"public.location_wayfinding_section_images" {
text org_id ""
uuid section_id ""
}
"public.location_wayfinding_sections" {
uuid id ""
uuid location_id ""
text org_id ""
}
"public.locations" {
uuid id ""
uuid offered_by_member_id ""
text org_id ""
}
"public.members" {
uuid id ""
text org_id ""
}
"public.organizations" {
text id ""
text parent_org_id "#671 self-referencing hierarchy pointer. NULL = root org. Direct writes are blocked by trg_block_direct_parent_org_id_writes for every role except service_role/postgres/supabase_admin — the only write path for authenticated/interactive callers is public.reparent_organization(). Cycle-prevented by trg_prevent_org_hierarchy_cycle. #quot;Is association#quot; is derived (EXISTS a child), never stored."
}
"public.registration_form_fields" {
uuid form_id ""
}
"public.registration_form_submissions" {
uuid event_id ""
uuid form_id ""
uuid member_id ""
text org_id ""
}
"public.registration_forms" {
uuid id ""
text org_id ""
}
"public.seating_tables" {
uuid event_id ""
text org_id ""
}
"public.signature_event_linked_events" {
uuid chamber_event_id ""
uuid signature_event_id ""
}
"public.signature_events" {
uuid id ""
uuid location_id "FK to the Location library (#3994) -- the place-attach source of truth for\n #3999. venue_name/venue_address (free text) stay as a fallback/audit trail\n and are never cleared when a Location is attached. Only\n parking_instructions/floorplan_url from signature_event_logistics are\n wayfinding data (per #3999 scope) -- absorbed into\n location_wayfinding_sections at attach-time by the frontend, not by this\n migration."
}
Generated by tbls

