Skip to content
Events & plans

discover_swipes

Discover-deck decisions on /my-plan ("Widen your year"). One row per dancer per card: a Yes or a Skip on another dancer, an event or a festival, so a card never comes back once decided (migration 0046). Kept apart from festival_waves on purpose: a wave is a message the other dancer sees, a deck Yes is private bookkeeping. `festival_slug` records the festival that put a dancer on the card — Yes on two or more dancers heading to the same festival raises the "add it to your year?" nudge.

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
dancer_iduuid no—
target_kindtext
dancereventfestival
no—
target_idtext no—
decisiontext
yesskip
no—
festival_slugtext yes—
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, target_kind, target_id) discover_swipes_unique

Indexes

  • (dancer_id)
    discover_swipes_dancer_idx

Foreign keys

  • dancer_id → dancers.id
    on delete cascade

Used by

Code that reads or writes this table, found by static analysis of the tRPC routers and API handlers (including helpers they call).

REST & webhooks

  • 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
  }
  discover_swipes {
    uuid id PK
    uuid dancer_id FK
  }
  dancers ||--o{ discover_swipes : "dancer_id"

Defined at server/database/schema.ts:1024 as discoverSwipes.