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
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| dancer_id | uuid | no | — | |
| target_kind | text dancereventfestival | no | — | |
| target_id | text | no | — | |
| decision | text yesskip | no | — | |
| festival_slug | text | yes | — | |
| 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, 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).
tRPC procedures
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.