Profiles & cities
community_group_reports
Per-user report tracking for community groups — prevents a single user from hiding a group by reporting it multiple times.
Columns
| Column | Type | Null | Default | Keys |
|---|---|---|---|---|
| id | uuid | no | gen_random_uuid() | PK |
| group_id | uuid | no | — | |
| dancer_id | uuid | 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
Unique
- (group_id, dancer_id) community_group_reports_group_dancer
Indexes
No secondary indexes.
Foreign keys
- group_id → community_groups.id on delete no action
- dancer_id → dancers.id on delete no action
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
REST & webhooks
- ANY /mcp
- ANY /mcp/public
Relations
Rendering diagram…
Diagram source
erDiagram
community_group_reports {
uuid id PK
uuid group_id FK
uuid dancer_id FK
}
community_groups {
uuid id PK
}
dancers {
uuid id PK
text email UK
text neon_auth_id UK
text username UK
}
community_groups ||--o{ community_group_reports : "group_id"
dancers ||--o{ community_group_reports : "dancer_id" Defined at server/database/schema.ts:302 as communityGroupReports.