Skip to content
Community engagement

reviews

Reviews & ratings — polymorphic by (targetType, targetSlug) so a review can attach to ANY entity (festival / venue / artist / organizer), including on-demand stubs created by "ask locals" recommendations, without needing a full entity table for each. `source` separates a normal review from an auto-5★ recommendation. One review per dancer per target.

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
target_typetext
festivalvenueartistorganizer
no—
target_slugtext no—
target_nametext yes—
city_slugtext yes—
dancer_iduuid no—
reviewer_nametext yes—
reviewer_usernametext yes—
ratinginteger no—
texttext yes—
sourcetext
reviewrecommendation
no"review"
statustext
visiblehidden
no"visible"
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

  • (target_type, target_slug, dancer_id) review_target_dancer_unique

Indexes

No secondary indexes.

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

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

Defined at server/database/schema.ts:262 as reviews.