Skip to content
Profiles & cities

profile_claims

"This is me / my venue" requests for existing profiles. An admin approves (→ profile_members owner row + profiles.claimed) or rejects.

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
profile_iduuid no—
dancer_iduuid no—
messagetext no""
statustext
pendingapprovedrejectedinfo_required
no"pending"
kindtext
claimjoinreclaim
no"claim"
requested_roletext
ownereditor
no"owner"
titletext yes—
evidencetext no""
evidence_typetext
domain_emailsocial_mediawebsite_linkdocumentationother
no"other"
reviewer_notetext no""
decided_byuuid yes—
created_attimestamp yesnow()
decided_attimestamp yes—

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

Keys, constraints & indexes

Unique

  • (profile_id, dancer_id) profile_claims_profile_dancer

Indexes

  • (status)
    profile_claims_status_idx

Foreign keys

  • profile_id → profiles.id
    on delete cascade
  • dancer_id → dancers.id
    on delete cascade
  • decided_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).

Relations

Rendering diagram…

Diagram source
erDiagram
  dancers {
    uuid id PK
    text email UK
    text neon_auth_id UK
    text username UK
  }
  profile_claims {
    uuid id PK
    uuid profile_id FK
    uuid dancer_id FK
    uuid decided_by FK
  }
  profiles {
    uuid id PK
    text username UK
  }
  profiles ||--o{ profile_claims : "profile_id"
  dancers ||--o{ profile_claims : "dancer_id"
  dancers |o--o{ profile_claims : "decided_by"

Defined at server/database/schema.ts:423 as profileClaims.