Skip to content
Profiles & cities

profiles

Professional profiles — venues, artists, organizers — under the unified /@<username> handle namespace (v4-style). Dancers keep their own row + handle in `dancers`; the /@handle route resolves either. Reviews attach polymorphically by (type, username).

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
usernametext no—
unique
typetext
venueartistorganizerpromoter
no—
nametext no—
citytext yes—
city_slugtext yes—
phototext yes—
biotext yes—
stylesjson yes[]
languagesjson yes[]
addresstext yes—
floor_typetext yes—
venue_typetext yes—
map_urltext yes—
amenitiesjsonb no[]
capacityinteger yes—
opening_hoursjsonb no[]
floor_plantext yes—
contactjsonb no{}
latdouble precision yes—
lngdouble precision yes—
guidelinestext yes—
booking_modeltext
freecommercial
no"commercial"
moderator_nametext yes—
moderator_handletext yes—
moderator_sinceinteger yes—
socialsjson yes[]
photosjsonb no[]
videosjsonb no[]
claimedboolean yesfalse
statustext
visiblehidden
no"visible"
rolesjsonb no[]
created_attimestamp yesnow()
source_refjsonb yes—

Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.

Keys, constraints & indexes

Unique

  • (username) profiles_username_unique

Indexes

No secondary indexes.

Foreign keys

None.

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

tRPC procedures

REST & webhooks

  • GET /api/cities
  • GET /api/cities/:slug
  • GET /api/city-options
  • POST /api/city-resolve
  • GET /api/city-search
  • GET /api/contacts/unsubscribe
  • ANY /api/profiles/:username/contacts
  • GET /api/profiles/:username/events
  • GET /api/profiles/:username/site
  • ANY /mcp
  • ANY /mcp/public

Relations

Rendering diagram…

Diagram source
erDiagram
  bookable_spaces {
    uuid id PK
    uuid profile_id FK
  }
  booking_inquiries {
    uuid id PK
    uuid profile_id FK
    uuid requester_id FK
  }
  booking_requests {
    uuid id PK
    uuid space_id FK
    uuid profile_id FK
    uuid organizer_id FK
    uuid requester_id FK
    uuid moderated_by_id FK
  }
  brand_looks {
    uuid id PK
    uuid profile_id FK
    uuid created_by FK
  }
  events {
    uuid id PK
    uuid host_profile_id FK
    uuid edited_by FK
  }
  follows {
    uuid id PK
    uuid dancer_id FK
    uuid profile_id FK
    uuid target_dancer_id FK
  }
  gig_applications {
    uuid id PK
    uuid gig_id FK
    uuid dancer_id FK
    uuid profile_id FK
    uuid decided_by FK
  }
  gigs {
    uuid id PK
    uuid dancer_id FK
    uuid poster_profile_id FK
  }
  giveaway_proposals {
    uuid id PK
    uuid event_id FK
    uuid proposed_by FK
    uuid profile_id FK
    uuid giveaway_id FK
    uuid decided_by FK
  }
  guideline_versions {
    uuid id PK
    uuid profile_id FK
    uuid election_id FK
    uuid moderator_dancer_id FK
  }
  handles {
    text handle PK
    uuid dancer_id FK,UK
    uuid profile_id FK,UK
  }
  inbound_requests {
    uuid id PK
    uuid dancer_id FK
    uuid event_id FK
    uuid profile_id FK
    uuid gig_id FK
  }
  mcp_audit {
    uuid id PK
    uuid grant_id FK
    uuid dancer_id FK
    uuid profile_id FK
    text confirm_nonce UK
  }
  moderator_elections {
    uuid id PK
    uuid profile_id FK
  }
  network_links {
    uuid id PK
    uuid profile_id FK
    uuid other_profile_id FK
    uuid created_by FK
  }
  organizer_subscriptions {
    uuid id PK
    uuid profile_id FK
    uuid dancer_id FK
    text stripe_subscription_id UK
  }
  profile_access_log {
    uuid id PK
    uuid profile_id FK
    uuid actor_id FK
    uuid subject_id FK
  }
  profile_affiliations {
    uuid id PK
    uuid artist_profile_id FK
    uuid organizer_profile_id FK
  }
  profile_claims {
    uuid id PK
    uuid profile_id FK
    uuid dancer_id FK
    uuid decided_by FK
  }
  profile_contacts {
    uuid id PK
    uuid profile_id FK
    uuid dancer_id FK
  }
  profile_invites {
    uuid id PK
    uuid profile_id FK
    uuid event_id FK
    uuid created_by FK
  }
  profile_members {
    uuid id PK
    uuid profile_id FK
    uuid dancer_id FK
    uuid added_by FK
  }
  profile_sites {
    uuid profile_id PK,FK
    uuid updated_by FK
  }
  profile_suggestions {
    uuid id PK
    uuid profile_id FK
    uuid event_id FK
    uuid suggested_by FK
  }
  profiles {
    uuid id PK
    text username UK
  }
  tracked_links {
    uuid id PK
    text code UK
    uuid event_id FK
    uuid profile_id FK
    uuid created_by FK
  }
  profiles ||--o{ bookable_spaces : "profile_id"
  profiles ||--o{ booking_inquiries : "profile_id"
  bookable_spaces ||--o{ booking_requests : "space_id"
  profiles ||--o{ booking_requests : "profile_id"
  profiles |o--o{ booking_requests : "organizer_id"
  profiles ||--o{ brand_looks : "profile_id"
  profiles |o--o{ events : "host_profile_id"
  profiles |o--o{ follows : "profile_id"
  gigs ||--o{ gig_applications : "gig_id"
  profiles |o--o{ gig_applications : "profile_id"
  profiles |o--o{ gigs : "poster_profile_id"
  events ||--o{ giveaway_proposals : "event_id"
  profiles ||--o{ giveaway_proposals : "profile_id"
  profiles ||--o{ guideline_versions : "profile_id"
  moderator_elections |o--o{ guideline_versions : "election_id"
  profiles |o--o{ handles : "profile_id"
  events |o--o{ inbound_requests : "event_id"
  profiles |o--o{ inbound_requests : "profile_id"
  gigs |o--o{ inbound_requests : "gig_id"
  profiles |o--o{ mcp_audit : "profile_id"
  profiles ||--o{ moderator_elections : "profile_id"
  profiles ||--o{ network_links : "profile_id"
  profiles ||--o{ network_links : "other_profile_id"
  profiles ||--o{ organizer_subscriptions : "profile_id"
  profiles ||--o{ profile_access_log : "profile_id"
  profiles ||--o{ profile_affiliations : "artist_profile_id"
  profiles ||--o{ profile_affiliations : "organizer_profile_id"
  profiles ||--o{ profile_claims : "profile_id"
  profiles ||--o{ profile_contacts : "profile_id"
  profiles ||--o{ profile_invites : "profile_id"
  events |o--o{ profile_invites : "event_id"
  profiles ||--o{ profile_members : "profile_id"
  profiles ||--o{ profile_sites : "profile_id"
  profiles ||--o{ profile_suggestions : "profile_id"
  events |o--o{ profile_suggestions : "event_id"
  events ||--o{ tracked_links : "event_id"
  profiles ||--o{ tracked_links : "profile_id"

Defined at server/database/schema.ts:327 as profiles.