Skip to content
Gigs & hangouts

gig_applications

An artist applies to a gig role. The gig's poster (or its page's team) accepts or declines; the applicant's account email is shared with the poster.

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
gig_iduuid no—
dancer_iduuid no—
profile_iduuid yes—
messagetext no—
statustext
pendingaccepteddeclinedwithdrawn
no"pending"
decided_byuuid yes—
decided_attimestamp yes—
created_attimestamp nonow()
updated_attimestamp nonow()

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

Keys, constraints & indexes

Unique

  • (gig_id, dancer_id) gig_applications_gig_dancer

Indexes

  • (dancer_id)
    gig_applications_dancer_idx

Foreign keys

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

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
  }
  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
  }
  profiles {
    uuid id PK
    text username UK
  }
  gigs ||--o{ gig_applications : "gig_id"
  dancers ||--o{ gig_applications : "dancer_id"
  profiles |o--o{ gig_applications : "profile_id"
  dancers |o--o{ gig_applications : "decided_by"
  dancers |o--o{ gigs : "dancer_id"
  profiles |o--o{ gigs : "poster_profile_id"

Defined at server/database/schema.ts:1477 as gigApplications.