Community engagement
city_videos
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| city_slug | text | no | — | |
| dancer_id | uuid | yes | — | |
| submitted_by_email | text | no | — | |
| title | text | no | — | |
| video_url | text | no | — | |
| thumbnail_url | text | yes | — | |
| dance_style | text | yes | — | |
| competition_month | text | no | — | |
| status | text pendingapprovedrejected | no | "pending" | |
| elo_score | integer | no | 1500 | |
| vote_count | integer | no | 0 | |
| 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
None besides the primary key.
Indexes
No secondary indexes.
Foreign keys
- dancer_id → dancers.id on delete no action
Referenced by
- video_votes (winner_video_id, loser_video_id)
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
city_videos {
uuid id PK
uuid dancer_id FK
}
dancers {
uuid id PK
text email UK
text neon_auth_id UK
text username UK
}
video_votes {
uuid id PK
uuid winner_video_id FK
uuid loser_video_id FK
uuid voter_dancer_id FK
}
dancers |o--o{ city_videos : "dancer_id"
city_videos ||--o{ video_votes : "winner_video_id"
city_videos ||--o{ video_votes : "loser_video_id"
dancers |o--o{ video_votes : "voter_dancer_id" Defined at server/database/schema.ts:168 as cityVideos.