Profiles & cities
profile_affiliations
Step 14 (ADR-004): artist ↔ organiser affiliations ("teaches at", "resident DJ at", "member of"). Links an artist profile to an organiser/venue profile.
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| artist_profile_id | uuid | no | — | |
| organizer_profile_id | uuid | no | — | |
| kind | text teaches_atresidentmember | no | — | |
| created_at | timestamp | yes | now() |
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).
tRPC procedures
No public or signed-in procedure.
REST & webhooks
None.
Relations
Rendering diagram…
Diagram source
erDiagram
profile_affiliations {
uuid id PK
uuid artist_profile_id FK
uuid organizer_profile_id FK
}
profiles {
uuid id PK
text username UK
}
profiles ||--o{ profile_affiliations : "artist_profile_id"
profiles ||--o{ profile_affiliations : "organizer_profile_id" Defined at server/database/schema.ts:450 as profileAffiliations.