Skip to content
Community engagement

giveaway_entries

Columns

ColumnTypeNullDefaultKeys
iduuid nogen_random_uuid()
PK
giveaway_iduuid no—
dancer_iduuid yes—
emailtext no—
created_attimestamp yesnow()

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

Keys, constraints & indexes

Unique

  • (giveaway_id, email) giveaway_entry_email_unique

Indexes

No secondary indexes.

Foreign keys

  • giveaway_id → giveaways.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).

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
  }
  giveaway_entries {
    uuid id PK
    uuid giveaway_id FK
    uuid dancer_id FK
  }
  giveaways {
    uuid id PK
  }
  giveaways ||--o{ giveaway_entries : "giveaway_id"
  dancers |o--o{ giveaway_entries : "dancer_id"

Defined at server/database/schema.ts:246 as giveawayEntries.