Skip to content
Events & plans

plan_items

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
dancer_iduuid no—
item_typetext
festivaleventgoalworkshop
no—
item_idtext no—
metadatajsonb yes—
share_goingboolean nofalse
created_attimestamp yesnow()

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).

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.