poll_options table
The poll_options table in the Reddit Clone Database Schema schema has 5 columns, keyed by id, with 1 foreign key to polls. 1 column in poll_votes references it.
Columns (5)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| post_id | uuid | not null, references polls.post_id | |
| text | varchar(200) | not null | |
| vote_count | integer | not null | |
| position | smallint | not null |
Indexes (1)
(post_id, position)
Relationships
poll_options.post_idreferencespolls.post_idpoll_votes.option_idreferencespoll_options