Profiles & cities
profile_members
Who manages a profile (hosting mode). Created when an admin approves a claim or when a dancer creates a new profile. `claimed` on the profile mirrors "has at least one owner" so the v3 sync never overwrites it.
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| profile_id | uuid | no | — | |
| dancer_id | uuid | no | — | |
| role | text ownereditormoderator | no | "owner" | |
| title | text | yes | — | |
| added_by | uuid | yes | — | |
| term_start | date | yes | — | |
| term_end | date | yes | — | |
| 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
- giveaway.propose
- giveaway.proposals
- giveaway.decideProposal
- booking.setAvailability
- election.open
- election.advanceToVoting
- election.close
- election.pendingBookings
- election.moderateBooking
- gigs.applyTo
- gigs.applications
- gigs.decideApplication
- events.festival
- referral.myLink
- referral.myResults
- referral.eventLinkResults
- referral.promoterDashboard
- referral.promoKit
- business.canManage
- business.myProfiles
- business.requestClaim
- business.create
- business.get
- business.spaces
- business.saveSpaces
- business.update
- businessEvents.list
- businessEvents.canEdit
- businessEvents.get
- businessEvents.create
- businessEvents.update
- businessEvents.duplicate
- businessEvents.seriesPreview
- businessEvents.createSeries
- businessEvents.series
- businessEvents.publishSeries
- businessEvents.attendees
- businessEvents.restore
- businessEvents.archive
- businessEvents.inbox
- businessFlyers.caption
- businessFlyers.writeCaption
- businessFlyers.saveCaption
- businessFlyers.state
- businessFlyers.readLook
- businessFlyers.make
- businessFlyers.directions
- businessFlyers.stop
- businessFlyers.again
- businessFlyers.feed
- businessFlyers.fix
- businessFlyers.refresh
- businessFlyers.batch
- businessFlyers.keep
- businessFlyers.copyLooks
- artistInvites.suggest
- artistInvites.pending
- artistInvites.profile
- artistInvites.saveProfile
- artistInvites.link
- artistInvites.notify
- artistInvites.get
- artistInvites.respond
- artistInvites.claim
- venueAsks.ask
- venueAsks.list
- venueAsks.book
- venueAsks.unbook
- inquiries.me
- inquiries.addToEvent
- inquiries.send
- inquiries.forProfile
- inquiries.setStatus
- businessPosts.list
- businessPosts.writeCaption
- businessPosts.saveCaption
- businessPosts.writeCaptions
- businessPosts.propose
- businessPosts.add
- businessPosts.update
- businessPosts.remove
- businessLooks.list
- businessLooks.create
- businessLooks.update
- businessLooks.remove
- businessLooks.read
- businessLooks.generate
- businessSite.get
- businessSite.save
- businessSite.contacts
- businessSite.updateContact
- businessSite.removeContact
- businessTeam.requestAccess
- businessTeam.team
- businessTeam.decideJoin
- businessTeam.setRole
- businessTeam.removeMember
- businessTeam.history
- businessNetwork.list
- businessNetwork.add
- businessNetwork.hide
- businessNetwork.restore
- organizerSubscription.createCheckout
- attendance.checkIn
- oauth.authorizeInfo
- oauth.approve
- oauth.auditForProfile
REST & webhooks
- ANY /api/profiles/:username/contacts
- 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
}
profile_members {
uuid id PK
uuid profile_id FK
uuid dancer_id FK
uuid added_by FK
}
profiles {
uuid id PK
text username UK
}
profiles ||--o{ profile_members : "profile_id"
dancers ||--o{ profile_members : "dancer_id"
dancers |o--o{ profile_members : "added_by" Defined at server/database/schema.ts:388 as profileMembers.