Skip to content
Profiles & cities

profile_suggestions

Artist confirmation (migration 0033). An organizer's photos, video and name for an artist in their line-up are suggestions on the artist's profile until the artist approves them through a personal link (profile_invites).

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
profile_iduuid no—
kindtext
photovideonamebiocitystylesinstagramwebsitefacebook
no—
valuetext no—
event_iduuid yes—
suggested_byuuid yes—
statustext
pendingapprovedrejected
no"pending"
decided_attimestamp yes—
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

  • (profile_id, status)
    profile_suggestions_profile_idx
  • (profile_id, kind, value)unique
    profile_suggestions_pending_uidx · where "profile_suggestions"."status" = 'pending'

Foreign keys

  • profile_id → profiles.id
    on delete cascade
  • event_id → events.id
    on delete set null
  • suggested_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
  }
  events {
    uuid id PK
    uuid host_profile_id FK
    uuid edited_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
  }
  profiles |o--o{ events : "host_profile_id"
  dancers |o--o{ events : "edited_by"
  profiles ||--o{ profile_suggestions : "profile_id"
  events |o--o{ profile_suggestions : "event_id"
  dancers |o--o{ profile_suggestions : "suggested_by"

Defined at server/database/schema.ts:1174 as profileSuggestions.