Events & plans
plan_items
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| dancer_id | uuid | no | — | |
| item_type | text festivaleventgoalworkshop | no | — | |
| item_id | text | no | — | |
| metadata | jsonb | yes | — | |
| share_going | boolean | no | false | |
| created_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
- (dancer_id, item_type, item_id) plan_items_dancer_item
Indexes
- (dancer_id)plan_items_dancer_idx
Foreign keys
- dancer_id → dancers.id on delete no action
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
- auth.deleteAccount
- hangouts.listTonight
- hangouts.eventOptions
- events.festivals
- events.festival
- plan.count
- plan.countBatch
- plan.list
- plan.listDetailed
- plan.add
- plan.updateMetadata
- plan.remove
- plan.goingList
- plan.myPlan
- plan.sharedPlan
- plan.discover
- plan.weekSocials
- plan.myCourses
- plan.goingBatch
- plan.setShareGoing
- plan.getShareGoing
- plan.proofShowcase
- plan.suggestions
- businessEvents.attendees
- artistInvites.get
- wave.discoverPool
REST & webhooks
- GET /api/festivals
- ANY /mcp
- ANY /mcp/public
Relations
Rendering diagram…
Diagram source
erDiagram
dancers {
uuid id PK
text email UK
text neon_auth_id UK
text username UK
}
plan_items {
uuid id PK
uuid dancer_id FK
}
dancers ||--o{ plan_items : "dancer_id" Defined at server/database/schema.ts:731 as planItems.