DevTalk - Datahouse
Tables (6)
tags
- id — INT — Primary key
- name — VARCHAR(50) — NOT NULL
- color — VARCHAR(7)
- created_at — TIMESTAMP — NOT NULL
talk_tags
- talk_id — INT — Foreign key → talks.id
- tag_id — INT — Foreign key → tags.id
talks
- id — INT — Primary key
- proposer_id (Key) — INT — Foreign key → users.id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT — NOT NULL
- status — talk_status — NOT NULL
- message_ts — VARCHAR(20)
- scheduled_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
users
- id (Key) — INT — Primary key — NOT NULL
- slack_user_id — VARCHAR(20) — NOT NULL
- display_name — VARCHAR(100)
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
votes
- id — INT — Primary key
- user_id — INT — Foreign key → talks.id
- talks_id — INT — Foreign key → users.id — NOT NULL
- points — SMALLINT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
voting_pools
- id — INT — Primary key
- user_id — INT — Foreign key → users.id — NOT NULL
- period_start — DATE — NOT NULL
- total_points — SMALLINT — NOT NULL
- remaining_points — SMALLINT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- CHECK — (remaining_points >= 0 AND remaining_points <= total_points)