Profiles & cities
profile_invites
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| token | text | no | — | |
| profile_id | uuid | no | — | |
| event_id | uuid | yes | — | |
| created_by | uuid | yes | — | |
| created_at | timestamp | yes | now() | |
| last_used_at | timestamp | yes | — | |
| status | text invitedconfirmeddeclinedproposed | no | "invited" | |
| responded_at | timestamp | yes | — | |
| programme_ok | boolean | yes | — | |
| programme_note | text | yes | — | |
| posts_ok_at | timestamp | yes | — | |
| message | text | yes | — | |
| kind | text artistvenue | no | "artist" | |
| request | jsonb | yes | — | |
| terms | jsonb | yes | — | |
| alternative | text | yes | — | |
| outcome | text | yes | — | |
| notified_at | timestamp | yes | — |
Value lists come from .$type<'a' | 'b'>() in the schema — enforced in TypeScript only, not by the database.
Keys, constraints & indexes
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_invites {
uuid id PK
uuid profile_id FK
uuid event_id FK
uuid created_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_invites : "profile_id"
events |o--o{ profile_invites : "event_id"
dancers |o--o{ profile_invites : "created_by" Defined at server/database/schema.ts:1189 as profileInvites.