attendances
Attendances (ADR-008, migration 0044). One row per dancer per event: replaces the festival/event rows of `plan_items` (Going clicks) and `festival_signups` (ticket holders). Status ladder: interested → going → ticket_holder. One visibility setting replaces both `plan_items.share_going` and `festival_signups.roster_visibility`. Default visibility = hidden (opt-in). Phase 4 expand step: this table is created alongside the old tables. New Going clicks dual-write here and to `plan_items`; the old reads stay on `plan_items`/`festival_signups` until the switch step. `order_id` is nullable and has no FK yet (the `orders` table ships in Phase 3 Step 22).
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| event_id | uuid | no | — | |
| dancer_id | uuid | yes | — | |
| buyer_email | text | yes | — | |
| status | text interestedgoingticket_holder | no | — | |
| source | text clickfree_passsocial_passstripetickettailorclaim | no | "click" | |
| order_id | uuid | yes | — | |
| visibility | text hiddenpublic_minimalpublic_full | no | "hidden" | |
| partner_status | text lookingfound | yes | — | |
| travel_booked_at | timestamp | yes | — | |
| stay_booked_at | timestamp | yes | — | |
| vacation_booked_at | timestamp | yes | — | |
| checked_in_at | timestamp | yes | — | |
| verified_at | timestamp | yes | — | |
| created_at | timestamp | yes | now() | |
| updated_at | timestamp | yes | now() |
Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.
Keys, constraints & indexes
Unique
- (event_id, dancer_id) attendances_event_dancer
Indexes
- (event_id, lower("attendances"."buyer_email"))uniqueattendances_event_email_uidx · where "attendances"."dancer_id" IS NULL
- (event_id, status)attendances_event_status_idx · where "attendances"."visibility" <> 'hidden'
- (dancer_id)attendances_dancer_idx
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
REST & webhooks
- ANY /mcp
- ANY /mcp/public
Relations
Rendering diagram…
Diagram source
erDiagram
attendances {
uuid id PK
uuid event_id FK
uuid dancer_id FK
}
dancers {
uuid id PK
text email UK
text neon_auth_id UK
text username UK
}
events {
uuid id PK
uuid host_profile_id FK
uuid edited_by FK
}
events ||--o{ attendances : "event_id"
dancers |o--o{ attendances : "dancer_id"
dancers |o--o{ events : "edited_by" Defined at server/database/schema.ts:764 as attendances.