Skip to content
Community engagement

city_videos

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
city_slugtext no—
dancer_iduuid yes—
submitted_by_emailtext no—
titletext no—
video_urltext no—
thumbnail_urltext yes—
dance_styletext yes—
competition_monthtext no—
statustext
pendingapprovedrejected
no"pending"
elo_scoreinteger no1500
vote_countinteger no0
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

None besides the primary key.

Indexes

No secondary indexes.

Foreign keys

  • dancer_id → dancers.id
    on delete no action

Referenced by

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