Skip to content
Profiles & cities

profile_sites

A profile's own website, managed on WeDance (RAZ-412, migration 0045): the page's sections and words in every language (shared/types/profileSite.ts). The site renders GET /api/profiles/<username>/site.

Columns

ColumnTypeNullDefaultKeys
profile_iduuid no—
contentjsonb no—
updated_attimestamp nonow()
updated_byuuid yes—

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

  • profile_id → profiles.id
    on delete cascade
  • updated_by → dancers.id
    on delete set null

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 /api/profiles/:username/contacts
  • GET /api/profiles/:username/site
  • 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
  }
  profile_sites {
    uuid profile_id PK,FK
    uuid updated_by FK
  }
  profiles {
    uuid id PK
    text username UK
  }
  profiles ||--o{ profile_sites : "profile_id"
  dancers |o--o{ profile_sites : "updated_by"

Defined at server/database/schema.ts:1295 as profileSites.